From 183308e4444125a3a40619b73985e2575b352141 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 21 Feb 2019 16:21:45 +0100 Subject: [PATCH] fix Contains not working correctly --- .../core/migrations/0008_auto_20190221_1516.py | 18 ++++++++++++++++++ passbook/core/models.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 passbook/core/migrations/0008_auto_20190221_1516.py diff --git a/passbook/core/migrations/0008_auto_20190221_1516.py b/passbook/core/migrations/0008_auto_20190221_1516.py new file mode 100644 index 000000000..4c7e00ded --- /dev/null +++ b/passbook/core/migrations/0008_auto_20190221_1516.py @@ -0,0 +1,18 @@ +# Generated by Django 2.1.7 on 2019-02-21 15:16 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('passbook_core', '0007_auto_20190221_1233'), + ] + + operations = [ + migrations.AlterField( + model_name='fieldmatcherpolicy', + name='match_action', + field=models.CharField(choices=[('startswith', 'Starts with'), ('endswith', 'Ends with'), ('contains', 'Contains'), ('regexp', 'Regexp'), ('exact', 'Exact')], max_length=50), + ), + ] diff --git a/passbook/core/models.py b/passbook/core/models.py index d5fd8c085..eca304028 100644 --- a/passbook/core/models.py +++ b/passbook/core/models.py @@ -171,7 +171,7 @@ class FieldMatcherPolicy(Policy): MATCHES = ( (MATCH_STARTSWITH, _('Starts with')), (MATCH_ENDSWITH, _('Ends with')), - (MATCH_ENDSWITH, _('Contains')), + (MATCH_CONTAINS, _('Contains')), (MATCH_REGEXP, _('Regexp')), (MATCH_EXACT, _('Exact')), )