Fix #1017 - Exception caused by activity being set on incorrect foreign key
authorJessica Tallon <jessica@megworld.co.uk>
Wed, 29 Oct 2014 08:47:09 +0000 (08:47 +0000)
committerJessica Tallon <jessica@megworld.co.uk>
Wed, 29 Oct 2014 08:47:12 +0000 (08:47 +0000)
commitbc2c06a10d9c15ec161f51e8d942cb2e5028ce47
treea885d6be4473957cb8d477e172c66d283b16e055
parentc5f258fec07b9791b35d52298dd71954de81ef20
Fix #1017 - Exception caused by activity being set on incorrect foreign key

The .activity ForeignKey on several models such as MediaEntry expects
a ActivityIntmediatory ID not an Activity ID however in submit code the
activity attribute was being set the Activity, simply removing this
assignment should fix the issue as everything is set correctly at this point.

I have also moved the creation of the activity above the processing of media
to avoid race conditions.
mediagoblin/submit/lib.py
mediagoblin/user_pages/views.py