mirror of
https://github.com/dkmstr/openuds.git
synced 2025-01-11 05:17:55 +03:00
fixed label and autenticator labels to replace spaces by underscores
This commit is contained in:
parent
6081122311
commit
c208814dd0
@ -225,6 +225,8 @@ class Authenticators(ModelHandler):
|
||||
pass # will set field to null
|
||||
|
||||
fields['mfa_id'] = None
|
||||
# If label has spaces, replace them with underscores
|
||||
fields['small_name'] = fields['small_name'].strip().replace(' ', '_')
|
||||
|
||||
|
||||
|
||||
|
@ -199,6 +199,8 @@ class Transports(ModelHandler):
|
||||
|
||||
def beforeSave(self, fields: typing.Dict[str, typing.Any]) -> None:
|
||||
fields['allowed_oss'] = ','.join(fields['allowed_oss'])
|
||||
# If label has spaces, replace them with underscores
|
||||
fields['label'] = fields['label'].strip().replace(' ', '_')
|
||||
|
||||
def afterSave(self, item: Transport) -> None:
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user