mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-04-25 01:58:54 +02:00
feat: add function for cleaning dicts
This commit is contained in:
2
app/apps/common/utils/dicts.py
Normal file
2
app/apps/common/utils/dicts.py
Normal file
@@ -0,0 +1,2 @@
|
||||
def remove_falsey_entries(data: dict, key: str) -> dict:
|
||||
return {k: v for k, v in data.items() if v.get(key)}
|
||||
Reference in New Issue
Block a user