mirror of
https://github.com/django/django.git
synced 2025-10-27 07:36:08 +00:00
Fixed #21189: Cleaned up usage of bare except clauses.
Thanks to berkerpeksag for the report and to claudep for the review.
This commit is contained in:
@@ -73,7 +73,7 @@ class GeometryField(forms.Field):
|
||||
elif self.srid != -1 and self.srid != geom.srid:
|
||||
try:
|
||||
geom.transform(self.srid)
|
||||
except:
|
||||
except GEOSException:
|
||||
raise forms.ValidationError(self.error_messages['transform_error'], code='transform_error')
|
||||
|
||||
return geom
|
||||
|
||||
Reference in New Issue
Block a user