Commit a0219e66 authored by felix.herrmann's avatar felix.herrmann
Browse files

Merge branch '429-data-submission-aggreement-generation-on-saving-fails' into 'master'

Resolve "Data submission aggreement generation on saving fails"

Closes #429

See merge request !404
parents 2d13be8a bc475567
......@@ -795,6 +795,12 @@ class DataSet(models.Model):
return self.license.get_license_name()
def get_license_text_from_ds(self):
if not self.license:
return "No license"
return self.license.get_license_text()
def license_is_valid(self):
""" use the DD_LICENSE_MATRIX map to check if a license
(given by slug) is in the list of a data access model
......@@ -854,8 +860,8 @@ class DataSet(models.Model):
"[[SPONSORS]]": self.funding,
"[[ACCESS_MODEL]]": self.get_data_access_display(),
"[[ACCESS_TEXT]]": access_text,
"[[LICENSE]]": self.license.get_license_name(),
"[[LICENSE_TEXT]]": self.license.get_license_text(),
"[[LICENSE]]": self.get_license_name_from_ds(),
"[[LICENSE_TEXT]]": self.get_license_text_from_ds(),
if dsa_page:
dsa_text = str(dsa_page.body)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment