Add Tast to remove accountings with 0 prize

This commit is contained in:
Robert Einsle 2018-03-31 17:49:45 +02:00
parent a62297f47f
commit eca2d2d2a9

View File

@ -79,3 +79,10 @@ def process_location_data(sender, **kwargs):
log.error(ld.error_msg)
except:
log.exception('', exc_info=True)
@receiver(post_save, sender=Accounting)
def process_accounting_data(sender, **kwargs):
log.info('Starte die Verarbeitung der Accounting-Data-Objecte')
data = Accounting.objects.filter(prize=0.0, reporter_uuid__isnull=True).exclude(time_to__isnull=True)
data.delete()