feat: Make decline-all endpoint support decline reason#178
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #178 +/- ##
=======================================
Coverage 86.08% 86.08%
=======================================
Files 149 149
Lines 12500 12501 +1
Branches 1194 1194
=======================================
+ Hits 10761 10762 +1
Misses 1424 1424
Partials 315 315 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
pwnage101
left a comment
There was a problem hiding this comment.
One nit and a simple fix, otherwise LGTM!
| ) | ||
|
|
||
|
|
||
| class LearnerCreditRequestDeclineAllSerializer(serializers.Serializer): # pylint: disable=abstract-method |
There was a problem hiding this comment.
Nit: While you're already in here, can you do a favor and rename this to LearnerCreditRequestDeclineAllRequestSerializer? It's a request serializer so it should end with "...RequestSerializer" despite the class name already having "Request" earlier.
| decline_reason = serializers.CharField( | ||
| required=False, | ||
| allow_blank=True, | ||
| allow_null=True, | ||
| help_text="Reason for declining all matching requests.", | ||
| ) |
There was a problem hiding this comment.
❌ We should impose max_length=255. Better to fail validation and throw HTTP 400 than to bump against the database limit and raise HTTP 500.
Description:
Make decline-all endpoint support decline reason
Jira:
ENT-11787
Merge checklist:
./manage.py makemigrationshas been runPost merge: