Skip to content

Instantly share code, notes, and snippets.

@andymckay
Created November 1, 2010 22:46
Show Gist options
  • Save andymckay/659013 to your computer and use it in GitHub Desktop.
Save andymckay/659013 to your computer and use it in GitHub Desktop.
diff --git a/apps/devhub/views.py b/apps/devhub/views.py
index 80b4e98..b0c0c30 100644
--- a/apps/devhub/views.py
+++ b/apps/devhub/views.py
@@ -305,6 +305,14 @@ def version_edit(request, addon_id, addon, version_id):
all([form.is_valid() for form in data.values()])):
data['version_form'].save()
data['file_form'].save()
+
+ for deleted in data['file_form'].deleted_forms:
+ file = deleted.cleaned_data["id"]
+ AddonLog.log(file.__class__, request,
+ action='delete',
+ file=deleted.cleaned_data["id"],
+ addon=addon)
+
if 'compat_form' in data:
for compat in data['compat_form'].save(commit=False):
compat.version = version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment