Skip to content

Commit

Permalink
[BUG FIX]
Browse files Browse the repository at this point in the history
- Dossier_get_annotations() : no force fetching
(0.0.14)
  • Loading branch information
Z3ZEL committed Aug 16, 2023
1 parent b4a3378 commit 769c0b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["setuptools>=61.0","requests"]
build-backend = "setuptools.build_meta"
[project]
name = "demarches-simpy"
version = "0.0.13"
version = "0.0.14"
authors = [
{ name="Esteban Rodriguez (Z3ZEL)", email="contact@rodriguez-esteban.com" },
]
Expand Down
8 changes: 2 additions & 6 deletions src/demarches_simpy/dossier.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,16 +304,12 @@ def get_annotations(self) -> list[dict[str, dict]]:
'''
if self.annotations is None:
self.request.add_variable('includeAnotations', True)
raw_annotations = self.get_data()['dossier']['annotations']
raw_annotations = self.force_fetch().get_data()['dossier']['annotations']
annotations = dict(map(lambda x : (x['label'], {'stringValue' : x['stringValue'], "id":x['id']}), raw_annotations))
self.annotations = annotations
return self.annotations

def force_fetch(self):
self.fields = None
self.annotations = None
self.instructeurs = None
return super().force_fetch()


def __str__(self) -> str:
return str("Dossier id : "+self.get_data()['dossier']['id']) + '\n' + "Dossier number " + str(self.get_data()['dossier']['number']) + "\n" + '(' + str(self.get_data()['dossier']['usager']['email']) + ')'
Expand Down

0 comments on commit 769c0b2

Please sign in to comment.