mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-24 21:34:41 +03:00
Merge remote-tracking branch 'origin/v3.5'
This commit is contained in:
commit
10bde45004
@ -111,13 +111,17 @@ class Config:
|
||||
readed.field_type = self._type
|
||||
readed.save(update_fields=['field_type'])
|
||||
self._type = readed.field_type
|
||||
except Exception:
|
||||
# Not found
|
||||
except DBConfig.DoesNotExist:
|
||||
# Not found, so we create it
|
||||
if self._default != '' and self._crypt:
|
||||
self.set(cryptoManager().decrypt(self._default))
|
||||
elif not self._crypt:
|
||||
self.set(self._default)
|
||||
self._data = self._default
|
||||
except Exception as e:
|
||||
logger.info('Error accessing db config {0}.{1}'.format(self._section.name(), self._key))
|
||||
logger.exception(e)
|
||||
self._data = self._default
|
||||
|
||||
if self._crypt:
|
||||
return cryptoManager().decrypt(typing.cast(str, self._data))
|
||||
|
Loading…
Reference in New Issue
Block a user