cleanup snippets error
shinglesware opened this issue ยท 1 comments
shinglesware commented
Running the cleanup_snippets via ./manage.py cleanup_snippets
produces the following error for me. Changing line 42 in dpaste/management/commands/cleanup_snippets.py
to deleteable_snippets = (deleteable_snippets | onetime_unviewed_snippets)
seems to have fixed the issue for me. Please advise if that is the appropriate fix.
๐ Database URL is: sqlite:////app/sqlite/dpaste.sqlite
๐ Production webserver installed. Will run on port 8000
๐ง Using local.py settings file.
Traceback (most recent call last):
File "/app/manage.py", line 34, in <module>
main()
File "/app/manage.py", line 30, in main
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/app/dpaste/management/commands/cleanup_snippets.py", line 42, in handle
deleteable_snippets = (expired_snippets | onetime_unviewed_snippets)
NameError: name 'expired_snippets' is not defined
DarrenOfficial commented
That is indeed the appropriate fix