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

Scheduling a job in the past raises an exception #11403

Closed
kkthxbye-code opened this issue Jan 5, 2023 · 0 comments · Fixed by #11404
Closed

Scheduling a job in the past raises an exception #11403

kkthxbye-code opened this issue Jan 5, 2023 · 0 comments · Fixed by #11404
Assignees
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@kkthxbye-code
Copy link
Contributor

NetBox version

v3.4.2

Python version

3.10

Steps to Reproduce

  1. Create a script
  2. Schedule it in the past

Expected Behavior

Form validation error message

Observed Behavior

Traceback (most recent call last):
  File "/home/main/devel/repos/netbox/venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/home/main/devel/repos/netbox/venv/lib/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/main/devel/repos/netbox/venv/lib/python3.10/site-packages/django/views/generic/base.py", line 103, in view
    return self.dispatch(request, *args, **kwargs)
  File "/home/main/devel/repos/netbox/netbox/utilities/views.py", line 53, in dispatch
    return super().dispatch(request, *args, **kwargs)
  File "/home/main/devel/repos/netbox/venv/lib/python3.10/site-packages/django/views/generic/base.py", line 142, in dispatch
    return handler(request, *args, **kwargs)
  File "/home/main/devel/repos/netbox/netbox/extras/views.py", line 815, in post
    elif form.is_valid():
  File "/home/main/devel/repos/netbox/netbox/utilities/forms/forms.py", line 69, in is_valid
    is_valid = super().is_valid()
  File "/home/main/devel/repos/netbox/venv/lib/python3.10/site-packages/django/forms/forms.py", line 205, in is_valid
    return self.is_bound and not self.errors
  File "/home/main/devel/repos/netbox/venv/lib/python3.10/site-packages/django/forms/forms.py", line 200, in errors
    self.full_clean()
  File "/home/main/devel/repos/netbox/venv/lib/python3.10/site-packages/django/forms/forms.py", line 437, in full_clean
    self._clean_fields()
  File "/home/main/devel/repos/netbox/venv/lib/python3.10/site-packages/django/forms/forms.py", line 455, in _clean_fields
    self.add_error(name, e)
  File "/home/main/devel/repos/netbox/venv/lib/python3.10/site-packages/django/forms/forms.py", line 392, in add_error
    raise TypeError(
TypeError: The argument `field` must be `None` when the `error` argument contains errors for multiple fields.
@kkthxbye-code kkthxbye-code added the type: bug A confirmed report of unexpected behavior in the application label Jan 5, 2023
@kkthxbye-code kkthxbye-code self-assigned this Jan 5, 2023
@kkthxbye-code kkthxbye-code added the status: accepted This issue has been accepted for implementation label Jan 5, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant