Skip to content

Commit

Permalink
allow resubmission for POST_MODERATION workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Ostap-Zherebetskyi authored and cslzchen committed Jan 6, 2025
1 parent 726eec1 commit e0644d0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion osf/utils/machines.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,14 @@ def save_changes(self, ev):
self.machineable.save()

def resubmission_allowed(self, ev):
return self.machineable.provider.reviews_workflow == Workflows.PRE_MODERATION.value
workflow = self.machineable.provider.reviews_workflow
result = any(
[
workflow == Workflows.PRE_MODERATION.value,
workflow == Workflows.POST_MODERATION.value and self.machineable.machine_state == 'pending'
]
)
return result

def perform_withdraw(self, ev):
self.machineable.date_withdrawn = self.action.created if self.action is not None else timezone.now()
Expand Down

0 comments on commit e0644d0

Please sign in to comment.