Commit e63cfa0d authored by Raphael Jacquot's avatar Raphael Jacquot

add sending moderation message when all line have been fixed

parent 216c01f4
Pipeline #32318 skipped with stage
......@@ -297,6 +297,10 @@ def get_line_form(request):
print(context)
# should test if there are any lines with errors. if not, do that
# send_email_to_moderator(self.settings, self.moderate_url, self.sub)
nb_errors = session.query(StarInfoEntry).filter(StarInfoEntry.submission_id==submission.id, StarInfoEntry.error_data.like('%"errors": {%')).count()
print("%d lines contain errors"%(nb_errors))
if nb_errors == 0:
moderate_url = request.route_url('moderate-submission', token=submission.moderate_ticket)
send_email_to_moderator(request.registry.settings, moderate_url, submission)
return render_to_response(renderer, context)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment