1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #28982 -- Simplified code with and/or.

This commit is contained in:
Дилян Палаузов
2018-01-03 18:52:12 -05:00
committed by Tim Graham
parent c2d0f8c084
commit d7b2aa24f7
55 changed files with 98 additions and 218 deletions

View File

@@ -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,