From 28e1c027fd7c3411f9c5ee129c0d05a5e06bbc70 Mon Sep 17 00:00:00 2001 From: Flavio Tarsetti <flavio.tarsetti@idiap.ch> Date: Wed, 22 Feb 2017 10:10:41 +0100 Subject: [PATCH] [plotters] in models updated deletable for plotterparameters with condition: if no reports are related to it --- beat/web/plotters/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beat/web/plotters/models.py b/beat/web/plotters/models.py index 0396001a2..2e5a9f8a9 100755 --- a/beat/web/plotters/models.py +++ b/beat/web/plotters/models.py @@ -284,7 +284,7 @@ class PlotterParameter(Contribution): def deletable(self): """Can be deleted if nobody points at me""" - return super(PlotterParameter, self).deletable() and (self.defaults.count() == 0) and (self.sharing == Shareable.PRIVATE) + return super(PlotterParameter, self).deletable() and (self.defaults.count() == 0) and (self.sharing == Shareable.PRIVATE) and (len(self.reports.all()) == 0) #_____ Utilities __________ -- GitLab