Skip to content

Commit

Permalink
can confirm moderated jobposts now
Browse files Browse the repository at this point in the history
  • Loading branch information
Bibhas committed Jun 18, 2018
1 parent b286615 commit 887467f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions hasjob/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class POST_STATE(LabeledEnum):
FLAGGED, MODERATED, REJECTED, SPAM, WITHDRAWN)

UNPUBLISHED = {DRAFT, PENDING}
UNPUBLISHED_OR_MODERATED = {DRAFT, PENDING, MODERATED}
GONE = {REJECTED, WITHDRAWN, SPAM}
UNACCEPTABLE = {REJECTED, SPAM}
PUBLIC = {CONFIRMED, REVIEWED, ANNOUNCEMENT, CLOSED}
Expand Down
2 changes: 1 addition & 1 deletion hasjob/models/jobpost.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def withdraw(self):
def close(self):
self.closed_datetime = db.func.utcnow()

@state.transition(state.UNPUBLISHED, state.CONFIRMED, title=__("Confirm"), message=__("This job post has been confirmed"), type='success')
@state.transition(state.UNPUBLISHED_OR_MODERATED, state.CONFIRMED, title=__("Confirm"), message=__("This job post has been confirmed"), type='success')
def confirm(self):
self.email_verified = True
self.datetime = db.func.utcnow()
Expand Down

0 comments on commit 887467f

Please sign in to comment.