1 parent f9b3e2e commit 392a38fCopy full SHA for 392a38f
1 file changed
ietf/checks.py
@@ -302,13 +302,13 @@ def maybe_patch_library(app_configs, **kwargs):
302
import os, django
303
django_path = os.path.dirname(django.__file__)
304
library_path = os.path.dirname(django_path)
305
- cwd = os.getcwd()
+ top_dir = os.path.dirname(settings.BASE_DIR)
306
# All patches in settings.CHECKS_LIBRARY_PATCHES_TO_APPLY must have a
307
# relative file path rooted in the django dir, for instance
308
# 'django/db/models/fields/__init__.py'
309
for patch_file in settings.CHECKS_LIBRARY_PATCHES_TO_APPLY:
310
try:
311
- patch_path = os.path.join(cwd, patch_file)
+ patch_path = os.path.join(top_dir, patch_file)
312
patch_set = patch.fromfile(patch_path)
313
if patch_set:
314
if not patch_set.apply(root=library_path.encode('utf-8')):
0 commit comments