Hi there, me again. I'm getting the following error when trying to create a record on the DB.The pk is normally assigned when the record is committed/saved, so I'm not really sure what is going on here. The command causing the problem is called as follows
await TableUpdateDate.vinyl.create(
company = company,
datatable=table,
date=datetime.now()
)
and a little bit later I get the following error.
await obj.insert(using=self.db)
File "/venv/lib/python3.10/site-packages/vinyl/saving.py", line 51, in insert
self._prepare_related_fields_for_save(operation_name="save")
File "/venv/lib/python3.10/site-packages/django/db/models/base.py", line 1095, in _prepare_related_fields_for_save
if obj.pk is None:
AttributeError: 'coroutine' object has no attribute 'pk'
sys:1: RuntimeWarning: coroutine 'VinylQuerySet.get_or_none' was never awaited
Hi there, me again. I'm getting the following error when trying to create a record on the DB.The pk is normally assigned when the record is committed/saved, so I'm not really sure what is going on here. The command causing the problem is called as follows
and a little bit later I get the following error.
Ideas ?