Commits

Seraphim Mellos  committed 32e5ea0

Fixed a bug with autofetch addon

  • Participants
  • Parent commits b69a1a2

Comments (0)

Files changed (1)

File transifex/resources/views.py

             url_form = URLInfoForm(request.POST,)
         if resource_form.is_valid() and url_form.is_valid():
             urlinfo = url_form.save(commit=False)
+            resource_new = resource_form.save()
+            urlinfo.resource = resource_new
             try:
                 urlinfo.update_source_file(fake=True)
             except Exception, e:
                     'url_form': url_form,
                     'resource': resource,
                 }, context_instance=RequestContext(request))
-            resource_new = resource_form.save()
 
-            urlinfo.resource = resource_new
             urlinfo.save()
 
             post_resource_save.send(sender=None, instance=resource_new,