Skip to content

Commit

Permalink
support value without dot (#457) (#458)
Browse files Browse the repository at this point in the history
Co-authored-by: Sergei Borodin <[email protected]>
  • Loading branch information
robot-datalens-back and ForrestGump authored May 23, 2024
1 parent f9e75b4 commit 1385dea
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def dump_dba_cls(self, act: dba_actions.ActionExecuteQuery) -> str:
return f"{act.dba_cls.__module__}.{act.dba_cls.__qualname__}"

def load_dba_cls(self, value: str) -> Union[Type[CommonBaseDirectAdapter]]:
mod_name, cls_name = value.rsplit(".", 1)
mod_name, cls_name = value.rsplit(".", 1) if "." in value else (None, value)
candidate = next(
filter(
lambda clz: clz.__module__ == mod_name and clz.__qualname__ == cls_name or clz.__qualname__ == value,
Expand Down

0 comments on commit 1385dea

Please sign in to comment.