Commit 6601707f authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

Manual transaction management in project application approve command

parent aca376e1
......@@ -40,7 +40,7 @@ from django.http import Http404
from astakos.im.models import ProjectApplication
@transaction.commit_on_success
@transaction.commit_manually
class Command(BaseCommand):
args = "<project application id>"
help = "Update project state"
......@@ -62,4 +62,7 @@ class Command(BaseCommand):
try:
app.approve()
except BaseException, e:
raise CommandError(e)
\ No newline at end of file
transaction.rollback()
raise CommandError(e)
else:
transaction.commit()
\ No newline at end of file
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