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

853229 - blank sync plan date gives incorrect error #647

Merged
merged 1 commit into from Sep 12, 2012

Conversation

jlsherrill
Copy link
Member

Previously we relied on convert_date_time to throw an exception to catch. If an exception occurred we would leave date blank and let the model validation throw a validation error.

With this commit: 18d2fbe that was removed, so the exception convert_date_time threw simply went to the browser as a notification. This would also mean that invalid formats would show up with a warning that they couldn't be 'blank'.

So this commit has 2 parts, simply have convert_date_time return nil if either date or time is blank, so the model validation will get caught. If the conversion to a date object throws an exception however, we want to catch it and throw a more human readable exception. Ideally this would occur within the model and be a validaiton error, but that doesn't seem to be easy to do, since the model doesn't even have a time field, and the date field is something different completely.

mccun934 added a commit that referenced this pull request Sep 12, 2012
853229 - blank sync plan date gives incorrect error
@mccun934 mccun934 merged commit f70e312 into Katello:master Sep 12, 2012
mccun934 added a commit that referenced this pull request Apr 27, 2013
853229 - blank sync plan date gives incorrect error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants