skip stuff if processupdates is no geometries were affected

This commit is contained in:
Laura Klünder 2017-12-23 02:38:18 +01:00
parent d51bc684bb
commit ff5826d8c2
4 changed files with 61 additions and 25 deletions

View file

@ -15,13 +15,15 @@ class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument('--include-history', action='store_const', const=True, default=False,
help=_('incluce all history as well'))
parser.add_argument('--include-geometries', action='store_const', const=True, default=False,
help=_('incluce all geometries as well'))
def handle(self, *args, **options):
from c3nav.mapdata.models import MapUpdate
logger = logging.getLogger('c3nav')
MapUpdate.objects.create(type='management')
MapUpdate.objects.create(type='management', geometries_changed=options['include_geometries'])
logger.info('New management update created.')
if options['include_history']: