Compare commits
No commits in common. "d2968e06527ed656ae92f0f6d72bbfeaf2f6cb01" and "87435614db709b23544ab0033ef17ed6a7342133" have entirely different histories.
d2968e0652
...
87435614db
@ -1,4 +1,3 @@
|
||||
import enum
|
||||
from inspect import signature, Parameter
|
||||
|
||||
from cpl_core.utils import String
|
||||
@ -29,9 +28,6 @@ class JSONProcessor:
|
||||
if isinstance(value, dict):
|
||||
value = JSONProcessor.process(parameter.annotation, value)
|
||||
|
||||
if issubclass(parameter.annotation, enum.Enum):
|
||||
value = parameter.annotation(value)
|
||||
|
||||
args.append(value)
|
||||
|
||||
elif parameter.default != Parameter.empty:
|
||||
|
@ -85,7 +85,7 @@ class AuthUserDTO(DtoABC):
|
||||
self._email = values['email']
|
||||
self._password = values['password']
|
||||
self._is_confirmed = values['isConfirmed']
|
||||
self._auth_role = AuthRoleEnum(values['authRole'])
|
||||
self._auth_role = values['authRole']
|
||||
|
||||
def to_dict(self) -> dict:
|
||||
return {
|
||||
|
@ -33,8 +33,8 @@ class UpdateAuthUserDTO(DtoABC):
|
||||
return self._change_password
|
||||
|
||||
def from_dict(self, values: dict):
|
||||
self._auth_user = AuthUserDTO().from_dict(values['authUser'])
|
||||
self._new_auth_user = AuthUserDTO().from_dict(values['newAuthUser'])
|
||||
self._auth_user = values['authUser']
|
||||
self._new_auth_user = values['newAuthUser']
|
||||
self._change_password = False if 'changePassword' not in values else bool(values['changePassword'])
|
||||
|
||||
def to_dict(self) -> dict:
|
||||
|
Loading…
Reference in New Issue
Block a user