-
Notifications
You must be signed in to change notification settings - Fork 21
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
Create a membership history when updating a membership #3301
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #3301 +/- ##
==========================================
- Coverage 88.32% 88.30% -0.02%
==========================================
Files 661 661
Lines 20882 20893 +11
==========================================
+ Hits 18444 18450 +6
- Misses 2438 2443 +5
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
@@ -1,10 +1,16 @@ | |||
from datetime import datetime |
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.
For consistency, use django.utils.timzone
start_date = datetime.strptime( | ||
request.data["membership"]["created_at"], "%Y-%m-%dT%H:%M:%S.%fZ" | ||
) |
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.
Do serializer.is_valid()
and use the serialized value in the create
below and you can throw away this.
Frontend change: webkom/lego-webapp#3805
Tested manually that the creation of membership history works, but I'll write up a quick test for it soon.
Related to ABA-400