akvo.rsr.management.commands.fix_iati_recipient_conflicts module
- class akvo.rsr.management.commands.fix_iati_recipient_conflicts.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]
Bases:
BaseCommand
- find_conflicted_projects(project_id=None)[source]
Find projects with recipient data at both project and transaction level.
- Returns:
List of Project objects with conflicts
- fix_conflicts(projects, verbosity, skip_validation=False)[source]
Fix conflicts by removing transaction-level recipient data.
- Args:
projects: List of projects to fix verbosity: Output verbosity level skip_validation: If True, skip re-running IATI validation
- Returns:
Total number of transactions fixed
- get_project_conflict_details(project)[source]
Get detailed information about a project’s conflicts.
- Returns:
dict with conflict details
- handle(*args, **options)[source]
The actual logic of the command. Subclasses must implement this method.
- help = 'Identify and fix projects with recipient countries/regions at both project and transaction level (which prevents IATI export)'