Skip to content

Commit 0cce441

Browse files
committed
fix: always adding an author
1 parent c85e76e commit 0cce441

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/DIRAC/ProductionSystem/Service/ProductionManagerHandler.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ def initializeHandler(cls, serviceInfoDict):
3030
# These are the methods to manipulate the Productions table
3131
#
3232

33-
types_addProduction = [str, str]
33+
types_addProduction = [prodTypes, str]
3434

3535
def export_addProduction(self, prodName, prodDescription):
3636
credDict = self.getRemoteCredentials()
37-
author = credDict.get("username")
37+
author = credDict.get("username", credDict.get("DN", credDict.get("CN")))
3838
authorGroup = credDict.get("group")
3939
res = self.productionDB.addProduction(prodName, prodDescription, author, authorGroup)
4040
if res["OK"]:
41-
gLogger.info("Added production %d" % res["Value"])
41+
gLogger.info("Added production", res["Value"])
4242
return res
4343

4444
types_deleteProduction = [prodTypes]

0 commit comments

Comments
 (0)