Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow published to be overridden #24

Merged
merged 1 commit into from
Mar 26, 2022

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