-
Notifications
You must be signed in to change notification settings - Fork 3
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
LGA-956 Error Messages #942
Conversation
7e0beca
to
30902e8
Compare
9d734b3
to
4866ab5
Compare
495a9bb
to
dad6d38
Compare
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.
Some excellent stuff here.
One potential missed thing (or otherwise something needs explaining for the likes of me! 😅) and a method which has now become rather complex and hard to read that I'd like us to refactor.
…class on drop-down
ed4f022
to
f9a0ac1
Compare
@@ -83,7 +83,7 @@ def __init__(self, message=None, freq_message=None, amount_message=None): | |||
self.freq_message = freq_message | |||
self.amount_message = amount_message | |||
|
|||
def append_interval_text(self, field): | |||
def append_interval_text(self, field, interval): |
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.
Oh yes, I spotted this when we were writing the signature but planned to lead you towards finding it yourself and then completely forgot 🤦 😅
self.amount_message = amount_message | ||
|
||
def append_interval_text(self, field, interval): | ||
if interval.data == "per_week": |
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.
On reflection, I think this might be worth refactoring to avoid the multiple if
s. Do you fancy pairing on it? Think it could be quite enjoyable.
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.
Very happy with this
What does this pull request do?
freq_message
when amount specified but rate (e.g. per week) not answered, andamount_message
for the opposite. This has been added to the MoneyIntervalAmountRequired function in validators.py.){{ Form.handle_errors(form) }}
being re-positioned on about 10 pages.Any other changes that would benefit highlighting?
Checklist