-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update pupa clean so that Jurisdiction, Division, and Post objects are not deleted #354
Conversation
@@ -18,7 +18,7 @@ | |||
entry_points='''[console_scripts] | |||
pupa = pupa.cli.__main__:main''', | |||
install_requires=[ | |||
'Django>=2.2', | |||
'Django>=2.2,<5', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
index_together
(used by python-opencivicdata, I guess) was removed in Django 5.
'NAME': os.getenv('POSTGRES_DB', 'test'), | ||
'USER': os.getenv('POSTGRES_USER', 'test'), | ||
'PASSWORD': os.getenv('POSTGRES_PASSWORD', 'test'), | ||
'HOST': os.getenv('POSTGRES_HOST', 'localhost'), | ||
'PORT': os.getenv('POSTGRES_PORT', 5432), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allow for setting these as environment variables, useful for, e.g., if you are running Postgres in a container.
@@ -118,23 +134,25 @@ def test_clean_command_failsafe(subparsers, organization, person): | |||
for p in stale_people: | |||
p.memberships.create(organization=organization) | |||
|
|||
cmd = CleanCommand(subparsers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pytest complained when this was instantiated multiple times.
2 similar comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool!
Description
See title. Divisions and Posts are unchanging and should not be removed by the
clean
command!