Fixes more merge issues
This commit is contained in:
parent
7916f5b1e5
commit
ce448de8b7
@ -1334,18 +1334,6 @@ class TestFilenameGeneration(DirectoriesMixin, TestCase):
|
||||
value_int=1234,
|
||||
)
|
||||
|
||||
cf2 = CustomField.objects.create(
|
||||
name="Select Field",
|
||||
data_type=CustomField.FieldDataType.SELECT,
|
||||
extra_data={"select_options": ["ChoiceOne", "ChoiceTwo"]},
|
||||
)
|
||||
|
||||
CustomFieldInstance.objects.create(
|
||||
document=doc_a,
|
||||
field=cf2,
|
||||
value_select=0,
|
||||
)
|
||||
|
||||
with override_settings(
|
||||
FILENAME_FORMAT="""
|
||||
{% if "Invoice" in custom_fields %}
|
||||
@ -1363,7 +1351,7 @@ class TestFilenameGeneration(DirectoriesMixin, TestCase):
|
||||
with override_settings(
|
||||
FILENAME_FORMAT="""
|
||||
{% if "Select Field" in custom_fields %}
|
||||
{{ title }}_{{ custom_fields|get_cf_value:'Select Field' }}
|
||||
{{ title }}_{{ custom_fields | get_cf_value('Select Field') }}
|
||||
{% else %}
|
||||
{{ title }}
|
||||
{% endif %}
|
||||
@ -1394,17 +1382,3 @@ class TestFilenameGeneration(DirectoriesMixin, TestCase):
|
||||
generate_filename(doc_a),
|
||||
"invoices/0.pdf",
|
||||
)
|
||||
|
||||
with override_settings(
|
||||
FILENAME_FORMAT="""
|
||||
{% if "Select Field" in custom_fields %}
|
||||
{{ title }}_{{ custom_fields|get_cf_value:'Select Field' }}
|
||||
{% else %}
|
||||
{{ title }}
|
||||
{% endif %}
|
||||
""",
|
||||
):
|
||||
self.assertEqual(
|
||||
generate_filename(doc_a),
|
||||
"Some Title_ChoiceOne.pdf",
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user