Beispiel #1
0
def parse_payment_message(sender, instance, created, raw, **kwargs):
    if not created or raw:
        return

    try:
        parsed = msg_parser.parse_message(instance.message)
        if not parsed:
            instance.parsed = '%s/%s' % (instance.date.year,
                instance.date.month)
        else:
            instance.parsed = instance.message
    except msg_parser.MessageSyntaxError:
        instance.correction_required = True

    instance.save()
Beispiel #2
0
def parse_payment_message(sender, instance, created, raw, **kwargs):
    if not created or raw:
        return

    try:
        parsed = msg_parser.parse_message(instance.message)
        if not parsed:
            instance.parsed = '%s/%s' % (instance.date.year,
                                         instance.date.month)
        else:
            instance.parsed = instance.message
    except msg_parser.MessageSyntaxError:
        instance.correction_required = True

    instance.save()
Beispiel #3
0
 def parse(self):
     try:
         return msg_parser.parse_message(self.parsed)
     except msg_parser.MessageSyntaxError:
         return None
Beispiel #4
0
 def parse(self):
     try:
         return msg_parser.parse_message(self.parsed)
     except msg_parser.MessageSyntaxError:
         return None