7.3. PrimaryKeyValueNotFound¶
Primarykey value not found in this instance.
example, when id not selected, and skylark dosen’t know which row to update:
>>> query = User.at(1).select(User.name)
>>> result = query.execute()
>>> user = result.one()
>>> user
{'name': 'jackx'}
>>> user.name = 'amy'
>>> user.save()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "../skylark.py", line 1103, in save
raise PrimaryKeyValueNotFound
skylark.PrimaryKeyValueNotFound