-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix: Restrict event save when information is insufficient #3305
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
Conversation
64bce5f
to
64052b4
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.
@uds5501 Why was this PR needed, Already checks for name, date, location are implemented and as far as tickets are concerned a server PR is already opened, And ticketing part was covered by @shreyanshdwivedi for FE ?
@kushthedude |
Arent the Semantic UI Validators enough for such ? |
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.
I guess if frontend validation is done then it's good to implement server side validation too.
5b616ed
to
029cba5
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.
LGTM for FE checks 👍
app/mixins/event-wizard.js
Outdated
} | ||
} | ||
} | ||
const numberOfTickets = data.tickets.length; |
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.
This code will completely crash if for some reason data.tickets is not defined.
Every where else, first it is checked if data.property exists. Data.undefined.length will throw an exception.
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.
@CosmicCoder96 Understood, changing accordingly
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.
@CosmicCoder96 Updated the assignment, please check now
f1b31cc
@mrsaicharan1 @shreyanshdwivedi please take a look |
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.
LGTM
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.
Squash and properly name commits.
f430c32
to
5733b32
Compare
5733b32
to
ecf413f
Compare
@CosmicCoder96 Squashed the commits, please take a look |
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.
Looks fine to me
Fixes #2920
Short description of what this resolves:
The event save action will send appropriate error message if the following cases fail in the client level
Checklist
development
branch.