Skip to content
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

Merged
merged 5 commits into from
Jun 9, 2024
Merged

Conversation

raczu
Copy link
Collaborator

@raczu raczu commented Jun 8, 2024

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

@raczu raczu added scope: backend Indicates that PR relates to backend changes. scope: database Indicates that PR relates to database changes. type: feature PR's categorised as feature. type: fix PR's categorised as fix (for issues). status: ready for review Determines that PR is ready for review. labels Jun 8, 2024
@raczu raczu self-assigned this Jun 8, 2024
@raczu raczu requested a review from wzarek June 8, 2024 16:53
@wzarek
Copy link
Owner

wzarek commented Jun 8, 2024

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

@raczu
Copy link
Collaborator Author

raczu commented Jun 8, 2024

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

@raczu raczu changed the title [RSN-67] Add more event statuses and fix some errors. [RSN-67] Add more event statuses and fix some errors Jun 8, 2024
Comment on lines +71 to +72
ZipCode = !string.IsNullOrEmpty(request.Address.ZipCode) ?
request.Address.ZipCode : null
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ZipCode = !string.IsNullOrEmpty(request.Address.ZipCode) ?
request.Address.ZipCode : null
ZipCode = request?.Address?.ZipCode

Copy link
Owner

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

Copy link
Owner

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

Copy link
Collaborator Author

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

raczu added 4 commits June 9, 2024 22:41
@wzarek wzarek merged commit f1e6889 into main Jun 9, 2024
7 checks passed
@wzarek wzarek deleted the RSN-67 branch June 9, 2024 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: backend Indicates that PR relates to backend changes. scope: database Indicates that PR relates to database changes. status: ready for review Determines that PR is ready for review. type: feature PR's categorised as feature. type: fix PR's categorised as fix (for issues).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add more events statuses and refactor existing enums
2 participants