-
Notifications
You must be signed in to change notification settings - Fork 0
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
[RSN-67] Add more event statuses and fix some errors #53
Conversation
Please use closing keywords if it's connected to github issue, this way it will automatically close after merging PR, see https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue |
@wzarek done |
ZipCode = !string.IsNullOrEmpty(request.Address.ZipCode) ? | ||
request.Address.ZipCode : null |
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.
ZipCode = !string.IsNullOrEmpty(request.Address.ZipCode) ? | |
request.Address.ZipCode : null | |
ZipCode = request?.Address?.ZipCode |
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.
Context: we can use null propagation to check for nulls, for empty ones I think we don't care really, propably it will be handled on FE anyways
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.
But if you really want to check it for being empty then alright, let's go with that
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.
Turned out that not existing fields are set to null by default, however if their value will be set to empty string this violates database and causing exception
Additionally, added 'ValidateNever' attribute to login and register request classes to get rid of default validation performed by ApiController.
This reverts commit 7a5bf14.
Description
Add more event statuses with the aim of enabling better control over their states. Additionally, changed the
FluentValidation
library to do not use its deprecated version (FluentValidation.AspNetCore
) and fixed registering user logic to properly handle empty phone or zip-code.Related issue and/or ticket
RSN-67
closes #52