Qiskit / qiskit-serverless

A programming model for leveraging quantum and classical resources
https://qiskit.github.io/qiskit-serverless/
Apache License 2.0
68 stars 31 forks source link

Fix job failing and marking it error #1455

Closed akihikokuroda closed 3 months ago

akihikokuroda commented 3 months ago

Summary

Fix the issue with the following log

  File "/usr/src/app/api/management/commands/schedule_queued_jobs.py", line 86, in handle
    job.save()
  File "/usr/local/lib/python3.11/site-packages/django/db/models/base.py", line 778, in save
    self._prepare_related_fields_for_save(operation_name="save")
  File "/usr/local/lib/python3.11/site-packages/django/db/models/base.py", line 1093, in _prepare_related_fields_for_save
    raise ValueError(
ValueError: save() prohibited to prevent data loss due to unsaved related object 'compute_resource'.

Details and comments