diff --git a/src/LHCbDIRAC/ProductionManagementSystem/Agent/ProductionStatusAgent.py b/src/LHCbDIRAC/ProductionManagementSystem/Agent/ProductionStatusAgent.py
index 539bddc755fe9935afc532309779163bc5c28c00..fc28f68776c192296d30d80bc45d539eeb8afdb8 100644
--- a/src/LHCbDIRAC/ProductionManagementSystem/Agent/ProductionStatusAgent.py
+++ b/src/LHCbDIRAC/ProductionManagementSystem/Agent/ProductionStatusAgent.py
@@ -572,13 +572,6 @@ class ProductionStatusAgent(AgentModule):
                         f"{tID} ({prID}) as the input query has an end date",
                     )
                     continue
-                if "hasActiveInput" in tInfo:
-                    self.log.info(
-                        "hasActiveInput has been overridden for",
-                        f"{tID} ({prID}) to be {tInfo['hasActiveInput']}",
-                    )
-                    tInfo["hasActiveInput"] = True
-                    continue
                 for inputID in tInfo["inputIDs"]:
                     if inputID in summary["prods"]:
                         inputState = summary["prods"][inputID]["state"]
@@ -615,7 +608,9 @@ class ProductionStatusAgent(AgentModule):
                 return S_ERROR("Too dangerous to continue")
             inputBkQuery = retVal["Value"]
             tInfo["hasEndDate"] = "EndDate" in inputBkQuery
-            if inputBkQuery.get("ConfigVersion") in Operations().getValue("AnalysisProductions/ForceActiveInput", []):
+            if not tInfo["hasEndDate"] and inputBkQuery.get("ConfigVersion") in Operations().getValue(
+                "AnalysisProductions/ForceActiveInput", []
+            ):
                 tInfo["hasActiveInput"] = True
             if "ProductionID" in inputBkQuery:
                 tInfo["inputIDs"] = [inputBkQuery["ProductionID"]]
diff --git a/src/LHCbDIRAC/ProductionManagementSystem/scripts/dirac_production_request_run_local.py b/src/LHCbDIRAC/ProductionManagementSystem/scripts/dirac_production_request_run_local.py
index 3c14312667245327ef10ab4a2482ee82ec89ae9c..082ec3cb9226f39ca40f8c75ebe7a611031b4519 100644
--- a/src/LHCbDIRAC/ProductionManagementSystem/scripts/dirac_production_request_run_local.py
+++ b/src/LHCbDIRAC/ProductionManagementSystem/scripts/dirac_production_request_run_local.py
@@ -264,7 +264,7 @@ def main():
 
     # TODO: pr._buildProduction eats stepsInProd
     prod = pr._buildProduction(**kwargs)
-    return returnValueOrRaise(prod.runLocal())
+    returnValueOrRaise(prod.runLocal())
 
 
 def prepareProductionRequest(