def map_priority(self, source_priority): """ Maps the source priority to superdesk priority :param str source_priority: :return int: priority of the item """ if source_priority and source_priority.isdigit(): if int(source_priority) in Priority.values(): return int(source_priority) return Priority.Ordinary.value