Repository navigation
Fix community library submission date updates - #6451
ArpitaSamanta10 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
|
👋 Hi @ArpitaSamanta10, thanks for contributing! For the review process to begin, please verify that the following is satisfied:
📢✨ Before we assign a reviewer:
Also check that issue requirements are satisfied & you ran Pull requests that don't follow the guidelines will be closed. Reviewer assignment can take up to 2 weeks. 📎 We couldn't find an issue linked to this pull request. Please edit the description and link one under References, for example |
|
📢✨ Before we assign a reviewer, we'll turn on |
🟡 Waiting for changesOutcome: reviewed Last updated: 2026-11-18 17:21 UTC |
rtibblesbot
left a comment
There was a problem hiding this comment.
PR #6451 fixes date_updated on both bulk status updates. Bulk update() skips auto_now, so each now sets the field explicitly. Tests cover both paths. They also check that untouched rows keep their timestamps.
CI passing.
Next step: Needs a full code review by a human engineer.
- The author is outside the team: confirm this should be built at all.
Written by rtibblesbot, an LLM-based coding agent.
Summary
Fixed an issue where the
date_updatedfield was not refreshed when community library submissions changed status through queryset updates.The
auto_now=Trueoption on the model field does not automatically update timestamps when using Django'sQuerySet.update()method. As a result, submissions transitioning fromPENDINGtoSUPERSEDEDor fromLIVEtoAPPROVEDretained their previous update timestamps.This change explicitly sets
date_updated=timezone.now()in both queryset updates to ensure the timestamp accurately reflects the status change.Regression tests have also been added to verify the timestamp updates and ensure submissions belonging to other channels remain unaffected.
References
date_updated#6414Reviewer guidance
The following verification has been performed:
date_updatedwhen another submission becomes LIVE.date_updatedwhen it becomes SUPERSEDED.Tests executed:
CommunityLibrarySubmissionTestCase: 18 passedAdminViewSetTestCase: 20 passedtest_community_library_submission.py: 60 passedNo UI changes or database migrations are involved.
AI usage
I used Claude Code to analyze the existing implementation, identify the queryset updates that bypass Django's
auto_nowbehavior, and implement the corresponding fixes and regression tests.I reviewed the generated changes and test results, checked that the implementation followed the existing project patterns, and verified the regression tests by temporarily removing the production fix to confirm that they failed as expected. The fix was then restored, and the tests and pre-commit checks passed.
The final changes were limited to the two timestamp updates and their corresponding regression tests.
[x] Contribution is aligned with our contributing guidelines
[x]Pull request description has correctly filled AI usage section & follows our AI guidance: