-
-
Notifications
You must be signed in to change notification settings - Fork 775
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
update bounty expiry date to hackthon end date #8698
update bounty expiry date to hackthon end date #8698
Conversation
bounties_to_extend = Bounty.objects.filter(event=obj) | ||
for bounty in bounties_to_extend: | ||
bounty.expires_date=obj.end_date | ||
bounty.save() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^ tried using bulk save here but that didn't seem to work in admin as expected hence defaulting to saving one record at a time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's never going to be an unreasonable amount of entries anyway, and this is an admin function so should be fine
This looks perfect! Thank you |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codewise LGTM! The only niggle I have is with the _auto_
part of the name, this would imply that it's not something that can be ran manually -- would _bulk_update_expiry
make more sense?
bounties_to_extend = Bounty.objects.filter(event=obj) | ||
for bounty in bounties_to_extend: | ||
bounty.expires_date=obj.end_date | ||
bounty.save() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's never going to be an unreasonable amount of entries anyway, and this is an admin function so should be fine
@gdixon updated |
* update bounty expiry date to hackthon end date * Update change_form.html * Update admin.py
Issue
@connoroday
How to use
Update Related Bounties Expiry Date
button and all the bounties for the hackathon event should have the same expiry date.Check the video for more info