Esempio n. 1
0
 def __export_metadata_v1(self):
     return {
         METADATA_VERSION_KEY: 1,
         "title": self.title,
         "uploaded_picture_entry": pk_or_none(self.uploaded_picture_entry),
         "projects": [p.pk for p in self.projects.all()],
         "metadata": Metadata.export_all_from_entity(self),
     }
Esempio n. 2
0
 def __export_metadata_v1(self):
     return {
         METADATA_VERSION_KEY: 1,
         "title": self.title,
         "description": self.description,
         "is_template": self.is_template,
         "child_elements": [c.export_metadata() for c in self.child_elements.all()],
         "projects": [p.pk for p in self.projects.all()],
         "metadata": Metadata.export_all_from_entity(self),
     }
Esempio n. 3
0
 def __export_metadata_v1(self):
     # the DMP form can not change, therefore we just have to store the values
     return {
         METADATA_VERSION_KEY:
         1,
         "title":
         self.title,
         "status":
         self.status,
         "field_data":
         [data.export_metadata() for data in self.dmp_form_data.all()],
         "projects": [project.pk for project in self.projects.all()],
         "metadata":
         Metadata.export_all_from_entity(self),
     }