Skip to content

Commit

Permalink
Fix : Some coverage items are not displaying in Newspro [SDCP-755] (s…
Browse files Browse the repository at this point in the history
…uperdesk#1940)

* FIX : if planning item is locked when working on coverage assignment[CPCN-726]

* remove all functionality related to check planning is locked

* remove unwanted code
  • Loading branch information
devketanpro committed Apr 2, 2024
1 parent 0f6cda1 commit cdac148
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions server/planning/assignments/assignments.py
Original file line number Diff line number Diff line change
Expand Up @@ -1317,22 +1317,7 @@ def _publish_planning(item):
else:
logger.error("Failed to save planning version for planning item id {}".format(item["_id"]))

try:
# check if the planning item is locked
lock_service.validate_relationship_locks(planning_item, "planning")
use_published_planning = False
except SuperdeskApiError as ex:
# planning item is already locked.
use_published_planning = True
logger.exception(str(ex))

if use_published_planning:
# use the published planning and enqueue again
plan = published_planning_item.get("published_item")
else:
plan = planning_item

_publish_planning(plan)
_publish_planning(planning_item)
except Exception:
logger.exception("Failed to publish assignment for planning.")

Expand Down

0 comments on commit cdac148

Please sign in to comment.