Skip to content

Commit

Permalink
update datamodel version
Browse files Browse the repository at this point in the history
  • Loading branch information
fgregg committed Jun 21, 2024
1 parent 7ca4b6f commit b5dece5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dedupe/datamodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@


class DataModel(object):
version = 1
version = 2

def __init__(self, variable_definitions: Iterable[Variable]):
variable_definitions = list(variable_definitions)
Expand Down Expand Up @@ -151,6 +151,8 @@ def __setstate__(self, d):
if version is None and "_variables" in d:
d["_len"] = len(d.pop("_variables"))
d["primary_variables"] = d.pop("primary_fields")
elif version == 1:
d["field_variables"] = d.pop("primary_variables")

self.__dict__ = d

Expand Down

0 comments on commit b5dece5

Please sign in to comment.