Skip to content

Conversation

@garrettc
Copy link
Contributor

@garrettc garrettc commented Mar 2, 2022

I'm migrating my site over to Wagtail and using django-wm to handle webmentions.

Whilst running the content import I noticed that all the published dates for existing webmentions were set to today, because published is set to auto_now_add=True, which can't be overridden.

There's already a created_at field set in MentionsBaseModel using auto_now_add=True.

This change sets published to timezone.now maintaining existing functionality but allowing the field to be overriden during an import.

beatonma added a commit that referenced this pull request Mar 26, 2022
@beatonma beatonma mentioned this pull request Mar 26, 2022
@beatonma beatonma merged commit d4d382a into beatonma:master Mar 26, 2022
@beatonma
Copy link
Owner

This has been merged and is now available in version 2.2.0. Thank you :)

@garrettc garrettc deleted the bug/allow-published-override branch March 26, 2022 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants