mirror of
https://github.com/barkeser2002/offline-db.git
synced 2026-09-25 02:59:54 +03:00
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Senpai-YoloBot <41898282+github-actions[bot]@users.noreply.github.com>
12 lines
487 B
Python
12 lines
487 B
Python
import os
|
|
for root, _, files in os.walk('users/migrations'):
|
|
for file in files:
|
|
if file.endswith('.py'):
|
|
path = os.path.join(root, file)
|
|
with open(path, 'r') as f:
|
|
content = f.read()
|
|
if 'django.core.validators.RegexValidator' in content and 'import django' not in content:
|
|
content = 'import django.core.validators\n' + content
|
|
with open(path, 'w') as f:
|
|
f.write(content)
|