Skip to content

Fix issue #77: test created_at and updated_at#78

Draft
cld-vasconcelos wants to merge 1 commit intomainfrom
openhands-fix-issue-77
Draft

Fix issue #77: test created_at and updated_at#78
cld-vasconcelos wants to merge 1 commit intomainfrom
openhands-fix-issue-77

Conversation

@cld-vasconcelos
Copy link
Owner

This pull request fixes #77.

The issue has been successfully resolved. The changes introduced a new abstract model, TimestampedModel, which includes the created_at and updated_at fields with auto_now_add=True and auto_now=True, respectively, and both fields are nullable. This abstract model is then inherited by all relevant models (User, Picture, PictureComment, Collection, Contest, and ContestSubmission), ensuring they all have the required timestamp fields. Additionally, tests were added to verify that each model has these fields and that they are nullable. The tests check for the presence of the fields and confirm their nullability, thus addressing the issue requirements comprehensively.

Automatic fix generated by OpenHands 🙌

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.

test created_at and updated_at

2 participants