Changeset 2bf8872 in rattail


Ignore:
Timestamp:
06/11/18 12:42:03 (2 years ago)
Author:
Lance Edgar <lance@…>
Branches:
master
Children:
870fac5
Parents:
1bb58ce
Message:

Fix bug when --max-delete used for importer commands

when limit is reached, command should stop but should not fail

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rattail/importing/importers.py

    r1bb58ce r2bf8872  
    362362                    raise ImportLimitReached()
    363363
    364         self.progress_loop(delete, sorted(deleting),
    365                            message="Deleting {} data".format(self.model_name))
     364        try:
     365            self.progress_loop(delete, sorted(deleting),
     366                               message="Deleting {} data".format(self.model_name))
     367        except ImportLimitReached:
     368            pass
    366369
    367370        return deleted
Note: See TracChangeset for help on using the changeset viewer.