Commit 6a3be3c1 authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

cyclades: Mark serial as resolved if auto_accept

Modify 'issue_commission' function to mark the QuotaHolderSerial object
as resolved, if auto_accept option is used.
parent 7838604e
......@@ -98,7 +98,11 @@ def issue_commission(user, source, provisions,
raise faults.OverLimit(msg, details=details)
if serial:
return QuotaHolderSerial.objects.create(serial=serial)
serial_info = {"serial": serial}
if auto_accept:
serial_info["accept"] = True
serial_info["resolved"] = True
return QuotaHolderSerial.objects.create(**serial_info)
raise Exception("No serial")
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