diff options
| author | Дилян Палаузов <Dilyan.Palauzov@db.com> | 2018-01-03 18:52:12 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-01-03 20:12:23 -0500 |
| commit | d7b2aa24f75434c2ce50100cfef3586071e0747a (patch) | |
| tree | 9074eb7522888e744f948c52174f367a4281c200 /tests/fixtures | |
| parent | c2d0f8c084456b5073252a91eeb09ab3d7453b18 (diff) | |
Fixed #28982 -- Simplified code with and/or.
Diffstat (limited to 'tests/fixtures')
| -rw-r--r-- | tests/fixtures/tests.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/fixtures/tests.py b/tests/fixtures/tests.py index 4bdaeefbb0..f5df67a55b 100644 --- a/tests/fixtures/tests.py +++ b/tests/fixtures/tests.py @@ -51,8 +51,7 @@ class DumpDataAssertMixin: natural_foreign_keys=False, natural_primary_keys=False, use_base_manager=False, exclude_list=[], primary_keys=''): new_io = StringIO() - if filename: - filename = os.path.join(tempfile.gettempdir(), filename) + filename = filename and os.path.join(tempfile.gettempdir(), filename) management.call_command('dumpdata', *args, **{'format': format, 'stdout': new_io, 'stderr': new_io, |
