As of now it's basically a copy of PydanticDescriptor but that will change in the future with multi column primary keys
| 73 | |
| 74 | |
| 75 | class PkDescriptor: |
| 76 | """ |
| 77 | As of now it's basically a copy of PydanticDescriptor but that will |
| 78 | change in the future with multi column primary keys |
| 79 | """ |
| 80 | |
| 81 | def __init__(self, name: str) -> None: |
| 82 | self.name = name |
| 83 | |
| 84 | def __get__(self, instance: "Model", owner: type["Model"]) -> Any: |
| 85 | value = instance.__dict__.get(self.name, None) |
| 86 | return value |
| 87 | |
| 88 | def __set__(self, instance: "Model", value: Any) -> None: |
| 89 | instance._internal_set(self.name, value) |
| 90 | instance.set_save_status(False) |
| 91 | |
| 92 | |
| 93 | class RelationDescriptor: |
no outgoing calls
no test coverage detected