

def _set_pk_value(self, value):
    if (not self._meta.composite_key):
        setattr(self, self._meta.primary_key.name, value)

dataset/ETHPy150Open coleifer/peewee/peewee.py Model._set_pk_value/original