06/16 Phase 6 (continue)
This commit is contained in:
@@ -19,7 +19,7 @@ def create_report(listing, reporter, reason: ReportReason, note=None):
|
||||
reason=reason, note=(note or "").strip() or None)
|
||||
db.session.add(report)
|
||||
try:
|
||||
db.session.commit()
|
||||
db.session.flush()
|
||||
except IntegrityError:
|
||||
db.session.rollback()
|
||||
raise ReportError("you have already reported this listing")
|
||||
|
||||
Reference in New Issue
Block a user