File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -3363,18 +3363,23 @@ def backwards_compat_authors(
33633363 was removed. This signal is a backwards compatibility measure to ensure
33643364 FrozenAuthor records are being updated correctly.
33653365 """
3366- accounts = core_models .Account .objects .filter (pk__in = pk_set )
33673366 if action == "post_add" :
33683367 subq = models .Subquery (
33693368 ArticleAuthorOrder .objects .filter (
33703369 article = instance , author__id = models .OuterRef ("id" )
33713370 ).values_list ("order" )
33723371 )
3372+ accounts = core_models .Account .objects .filter (pk__in = pk_set )
33733373 accounts = accounts .annotate (order = subq ).order_by ("order" )
33743374 for account in accounts :
33753375 account .snapshot_as_author (instance )
3376- if action in ["post_remove" , "post_clear" ]:
3376+
3377+ if action == "post_remove" :
3378+ accounts = core_models .Account .objects .filter (pk__in = pk_set )
33773379 instance .frozen_authors ().filter (author__in = pk_set ).delete ()
33783380
3381+ if action == "post_clear" :
3382+ instance .frozen_authors ().delete ()
3383+
33793384
33803385m2m_changed .connect (backwards_compat_authors , sender = Article .authors .through )
You can’t perform that action at this time.
0 commit comments