It turns out this has to do with some additions to the fixture adding
of media entries. Since the new fake_upload field is True by default,
adding multiple entries that have media_files at once meant that
multiple additions of FileKeynames would be added at once if they were
not saved at the same time. Tricky!
Thankfully, Elrond helped us figure this one out. Thanks, Elrond :)
And thanks also to Aapo Rantalainen for sponsoring this commit!
user_b = fixture_add_user(u"chris_b")
media_a = fixture_media_entry(uploader=user_a.id, save=False,
- expunge=False)
+ expunge=False, fake_upload=False)
media_b = fixture_media_entry(uploader=user_b.id, save=False,
- expunge=False)
+ expunge=False, fake_upload=False)
Session.add(media_a)
Session.add(media_b)
Session.flush()