Remove info_source selection from Transaction serializer

This commit is contained in:
Tanner Collin 2022-01-18 08:17:53 +00:00
parent 4826f6dc8c
commit 5b12091584

View File

@ -33,20 +33,6 @@ class TransactionSerializer(serializers.ModelSerializer):
'Clearing', 'Clearing',
'Cash', 'Cash',
]) ])
info_source = serializers.ChoiceField([
'Web',
'DB Edit',
'System',
'Receipt or Stmt',
'Quicken Import',
'PayPal IPN',
'Auto',
'Nexus DB Bulk',
'IPN Trigger',
'Intranet Receipt',
'Automatic',
'Manual',
])
category = serializers.ChoiceField([ category = serializers.ChoiceField([
'Membership', 'Membership',
'OnAcct', 'OnAcct',
@ -86,7 +72,7 @@ class TransactionSerializer(serializers.ModelSerializer):
if validated_data['account_type'] != 'Clearing': if validated_data['account_type'] != 'Clearing':
if validated_data['amount'] == 0: if validated_data['amount'] == 0:
raise ValidationError(dict(account_type='You can\'t have a $0 {} transaction. Do you want "Membership Adjustment"?'.format(validated_data['account_type']))) raise ValidationError(dict(account_type='You can\'t have a $0.00 {} transaction. Do you want "Membership Adjustment"?'.format(validated_data['account_type'])))
elif validated_data['amount'] < 0.1: elif validated_data['amount'] < 0.1:
raise ValidationError(dict(amount='Don\'t try and trick me.')) raise ValidationError(dict(amount='Don\'t try and trick me.'))