From 0cce4412a66a1ae17f179bc1917e299d8c6aad7e Mon Sep 17 00:00:00 2001 From: Federico Stagni Date: Thu, 24 Aug 2023 09:23:09 +0200 Subject: [PATCH] fix: always adding an author --- .../ProductionSystem/Service/ProductionManagerHandler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/DIRAC/ProductionSystem/Service/ProductionManagerHandler.py b/src/DIRAC/ProductionSystem/Service/ProductionManagerHandler.py index df5ec620d13..cd9ef6b47bc 100644 --- a/src/DIRAC/ProductionSystem/Service/ProductionManagerHandler.py +++ b/src/DIRAC/ProductionSystem/Service/ProductionManagerHandler.py @@ -30,15 +30,15 @@ def initializeHandler(cls, serviceInfoDict): # These are the methods to manipulate the Productions table # - types_addProduction = [str, str] + types_addProduction = [prodTypes, str] def export_addProduction(self, prodName, prodDescription): credDict = self.getRemoteCredentials() - author = credDict.get("username") + author = credDict.get("username", credDict.get("DN", credDict.get("CN"))) authorGroup = credDict.get("group") res = self.productionDB.addProduction(prodName, prodDescription, author, authorGroup) if res["OK"]: - gLogger.info("Added production %d" % res["Value"]) + gLogger.info("Added production", res["Value"]) return res types_deleteProduction = [prodTypes]