Commit 758eeb1f authored by felix.herrmann's avatar felix.herrmann
Browse files

fix(mails): add more error logging

parent 5b6ddd66
......@@ -1339,8 +1339,11 @@ class DataSet(models.Model):
logger.error("in request publication")
pub_request = DataSetPublicationRequest.objects.filter(dataset=self, user=user)
# TODO: add a check for compatibility between access model and chosen license
logger.error("not self published if")
if not self.published:
logger.error("pub_request.count() < 1 if")
if pub_request.count() < 1:
logger.error("user_has_admin_right if")
if self.user_has_admin_right(user):
self.dataset_management_object.save()
self.published_main_category = self.get_main_category()
......@@ -1363,8 +1366,10 @@ class DataSet(models.Model):
return _("Dataset publication requested")
else:
logger.error("user has no admin right")
return _("Operation not allowed")
else:
logger.error("pub_request.count() < 1 false")
return _("Dataset publication request pending")
else:
......
Markdown is supported
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