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

500 error ved upload af duplicate image slugs #21

Closed
tyilo opened this issue Nov 7, 2015 · 0 comments
Closed

500 error ved upload af duplicate image slugs #21

tyilo opened this issue Nov 7, 2015 · 0 comments
Labels
Milestone

Comments

@tyilo
Copy link
Member

tyilo commented Nov 7, 2015

Hvis man uploader 2 billeder som har det samme slug (f.eks. det samme billede to gange), så får man en 500 error i stedet for en besked om at man nok har uploadet det samme billede flere gange til det samme album.
Relevant kode:

if len(Image.objects.all().filter(slug=slug)) > 0:
# XXX: This results in a 500 error
raise ValidationError('A file with this slug already exists')

@neic neic added this to the v1.0 milestone Nov 10, 2015
@neic neic added the bug label Nov 10, 2015
@neic neic closed this as completed in 53f0b68 Nov 10, 2015
@neic neic mentioned this issue Nov 12, 2015
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants