Replace CONFIG.get by getitem call

introduced in 3feeceb952bc
This commit is contained in:
Cédric Krier committed 2018-08-27 11:46:50 +02:00
1 parent b3d90ad9ed
commit 167ec92964
2 files changed
+2 -2

No files matched your search

@@ -97,7 +97,7 @@ class Image(BinaryMixin, Widget):
if self.field:
value = self.field.get_client(self.record)
if isinstance(value, int):
if value > CONFIG.get('image.max_size'):
if value > CONFIG['image.max_size']:
value = False
else:
value = self.field.get_data(self.record)
@@ -530,7 +530,7 @@ class Image(GenericText):
field = record[self.field_name]
value = field.get_client(record)
if isinstance(value, int):
if value > CONFIG.get('image.max_size'):
if value > CONFIG['image.max_size']:
value = None
else:
value = field.get_data(record)