akvo.rsr.management.commands.fix_orphaned_periods module

class akvo.rsr.management.commands.fix_orphaned_periods.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: BaseCommand

args = '<indicator|indicator_period> [<child_id> <parent_id>]'
handle(*args, **options)[source]

The actual logic of the command. Subclasses must implement this method.

help = 'Script for fixing orphaned indicators and periods'
akvo.rsr.management.commands.fix_orphaned_periods.find_orphaned_indicators()[source]

Find indicators which are orphaned, whose parents can be deduced.

akvo.rsr.management.commands.fix_orphaned_periods.find_orphaned_periods()[source]

Find periods which are orphaned, whose parents can be deduced.

akvo.rsr.management.commands.fix_orphaned_periods.pprint_period_lineage(period)[source]