Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
Fix for duplicate image asset tracebacks
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbasta committed Sep 6, 2012
1 parent 8eea387 commit 994d993
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions mkt/developers/forms.py
Expand Up @@ -308,10 +308,8 @@ def save(self, addon):

if self.cleaned_data['upload_hash']:
if not self.instance:
self.instance = ImageAsset.objects.create(
self.instance = ImageAsset.objects.get_or_create(
addon=addon, slug=self.slug)
else:
self.instance.addon = addon
upload_hash = self.cleaned_data['upload_hash']
upload_path = os.path.join(settings.TMP_PATH, 'image',
upload_hash)
Expand Down

0 comments on commit 994d993

Please sign in to comment.