AttributeError: 'TransitionApproval' object has no attribute 'iteration'
See original GitHub issueProgram raise error as title when I try to jump state
Is this a bug? I think iteration
is a field in Transition
model, not TransitionApproval
source in river.core.instanceworkflowobject.py (line:91)
@property
def recent_approval(self):
try:
return getattr(self.workflow_object, self.field_name + "_transition_approvals").filter(transaction_date__isnull=False).latest('transaction_date')
except TransitionApproval.DoesNotExist:
return None
@transaction.atomic
def jump_to(self, state):
def _transitions_before(iteration):
return Transition.objects.filter(workflow=self.workflow, workflow_object=self.workflow_object, iteration__lte=iteration)
try:
recent_iteration = self.recent_approval.iteration if self.recent_approval else 0
jumped_transition = getattr(self.workflow_object, self.field_name + "_transitions").filter(
iteration__gte=recent_iteration, destination_state=state, status=PENDING
).earliest("iteration")
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
AttributeError: module 'collections' has no attribute 'Iterator'
I am using a virtual environment as well which has the Django installed on it. I tried uninstalling the django and reinstalling but...
Read more >module 'collections' has no attribute 'Iterator' | Django | Python
Topic :-------- Attribute Error : module 'collections' has no attribute ' Iterator ' | Aryadrj - Django error- Python ...
Read more >iterators
In Python, we typically perform iteration using the for loop. ... AttributeError: 'list' object has no attribute '__next__'. An iterator's __next__ method ...
Read more >Python AttributeError: 'tuple' object has no attribute
AttributeError : 'tuple' object has no attribute. Learn Data Science with. This error occurs when attempting to access the values of a tuple...
Read more >object has no attribute '_state' - Google Groups
AttributeError : 'Question' object has no attribute '_state' The class definitions are : class QuestionSet(models.Model): title = models.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Fixed it in #139 Close
OK, I will create PR with testCase this week.