Skip to content

Comments

Fix issue #66: Add timestamps to models#76

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

Fix issue #66: Add timestamps to models#76
cld-vasconcelos wants to merge 1 commit intomainfrom
openhands-fix-issue-66-try2

Conversation

@cld-vasconcelos
Copy link
Owner

This pull request fixes #66.

The issue was to add 'created_at' and 'updated_at' fields to all models, with both fields being nullable. The changes introduced a new abstract model class, TimestampedModel, which includes these fields with the appropriate settings (null=True, blank=True). This class was then inherited by all relevant models (User, Picture, PictureComment, Collection, Contest, and ContestSubmission), ensuring that each model now has the created_at and updated_at fields. Additionally, tests were added to verify that these fields are not None upon creation of instances, confirming that the fields are being set correctly. Therefore, the issue has been successfully resolved as the required fields have been added and are functioning as expected.

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.

Add timestamps to models

2 participants