removes error reraising

This commit is contained in:
Niyaz Batyrshin 2020-06-07 13:14:18 +03:00
parent ed51ad5be6
commit 62ad18d8ff

View File

@ -238,10 +238,7 @@ class DateTime64Field(DateTimeField):
assert precision is None or isinstance(precision, int), 'Precision must be int type'
assert timezone is None or isinstance(timezone, str), 'Timezone must be string type'
if timezone:
try:
pytz.timezone(timezone)
except UnknownTimeZoneError:
raise Exception('Timezone must be a valid IANA timezone identifier')
pytz.timezone(timezone)
self.precision = precision
self.timezone = timezone