Always set new_blogurl if blogurl different from feed.link
authorStephen Frost <sfrost@snowman.net>
Fri, 5 May 2023 20:09:32 +0000 (16:09 -0400)
committerStephen Frost <sfrost@snowman.net>
Fri, 5 May 2023 20:09:32 +0000 (16:09 -0400)
commit054ec0edbb19d78b0e23cd2206ef580d3226a230
tree6824cc55b9eba7f2421084968b28545e17b8a3fa
parent93338dc0d03dc0cd3eeea14e02dad0ff386aa08d
Always set new_blogurl if blogurl different from feed.link

Previously, we set blogurl if the prior blogurl was set to empty-string
('') but that change wasn't picked up as part of what needed to be
updated, so instead always use new_blogurl if we need to set the blogurl
as this ensures that we'll realize there was a change and will update
the database accordingly.

At the same time, also send an email in every case that the blogurl is
changed, even when it's being changed from being empty.  This is perhaps
a bit noisy but it's been broken for so long that it's worth it to make
sure people are aware that it's now working and folks don't register new
blogs over and over again anyway.

Lastly, move the block that does the update and sets the new blogurl
value up higher so that if a new blogurl is set then the emails that are
generated from that run will use that new blogurl instead of the old
one (which could be confusing).
hamnadmin/hamnadmin/register/management/commands/aggregate_feeds.py
hamnadmin/hamnadmin/util/aggregate.py