Skip to content
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

cleanup snippets error #215

Closed
shinglesware opened this issue Aug 10, 2022 · 1 comment
Closed

cleanup snippets error #215

shinglesware opened this issue Aug 10, 2022 · 1 comment

Comments

@shinglesware
Copy link

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
Copy link
Owner

That is indeed the appropriate fix

arturs-krapans added a commit to arturs-krapans/dpaste that referenced this issue Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants