generated from dopt-python/py311
handle metadata separately in GUI, but common in database
This commit is contained in:
@@ -21,6 +21,38 @@ from wce_crm import constants, db
|
||||
from wce_crm.backend import backend
|
||||
from wce_crm.types import EntityIds, RecordingType
|
||||
|
||||
# %%
|
||||
empty = tuple()
|
||||
|
||||
# not any(empty)
|
||||
|
||||
all(empty)
|
||||
# %%
|
||||
dic = {
|
||||
"t1": "test1",
|
||||
"t2": "test2",
|
||||
"t3": "test3",
|
||||
"t4": "test4",
|
||||
}
|
||||
filter_keys = frozenset(("t3", "t2"))
|
||||
|
||||
dic_in, dic_out = backend.split_dict(dic, filter_keys)
|
||||
|
||||
print(f"{dic_in=}")
|
||||
print(f"{dic_out=}")
|
||||
|
||||
|
||||
# %%
|
||||
dic_update = {
|
||||
"t5": "new",
|
||||
"t6": "new_2",
|
||||
}
|
||||
|
||||
dic_updated = backend.dic_deep_update(dic, dic_update)
|
||||
print(f"{dic=}")
|
||||
print(f"{dic_update=}")
|
||||
print(f"{dic_updated=}")
|
||||
|
||||
# %%
|
||||
raw_ent_ids = EntityIds()
|
||||
db_ent_ids = EntityIds(un_id=3, an_id=2)
|
||||
|
||||
Reference in New Issue
Block a user