diff --git a/idhub/models.py b/idhub/models.py index 8e3785e..dd57062 100644 --- a/idhub/models.py +++ b/idhub/models.py @@ -563,6 +563,18 @@ class VerificableCredential(models.Model): return '' + def filter_dict(self, dic): + new_dict = {} + for key, value in dic.items(): + if isinstance(value, dict): + new_value = self.filter_dict(value) + if new_value: + new_dict[key] = new_value + elif value: + new_dict[key] = value + return new_dict + + class VCTemplate(models.Model): wkit_template_id = models.CharField(max_length=250) data = models.TextField() diff --git a/requirements.txt b/requirements.txt index a065a87..4aa9c3e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,10 +6,13 @@ black==23.9.1 python-decouple==3.8 jsonschema==4.19.1 pandas==2.1.1 +xlrd==2.0.1 +odfpy==1.4.1 requests==2.31.0 -#didkit==0.3.2 +didkit==0.3.2 jinja2==3.1.2 jsonref==1.1.0 pyld==2.0.3 more-itertools==10.1.0 dj-database-url==2.1.0 +ujson==5.9.0