

@classmethod
def create(cls, data):
    foreign_id = data.get('foreign_id')
    src = Source.by_foreign_id(foreign_id)
    if (src is None):
        src = cls()
        src.foreign_id = (foreign_id or make_token())
    src.update(data)
    db.session.flush()
    return foreign_id

dataset/ETHPy150Open pudo/aleph/aleph/model/source.py Source.create/VarMisuse@77/94 `src`->`foreign_id`