Skip to content

Commit 8778575

Browse files
[FIX] upgrade_analysis: comparing relation
1 parent 7603599 commit 8778575

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

upgrade_analysis/compare.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def compare_records(dict_old, dict_new, fields):
6565
with respect to the keys in the 'fields' arguments.
6666
Take apriori knowledge into account for mapped modules or
6767
model names.
68-
Return True of False.
68+
Return True or False.
6969
"""
7070
for field in fields:
7171
if field == "module":
@@ -74,6 +74,9 @@ def compare_records(dict_old, dict_new, fields):
7474
elif field == "model":
7575
if model_rename_map(dict_old["model"]) != dict_new["model"]:
7676
return False
77+
elif field == "relation":
78+
if model_map(dict_old["relation"]) != dict_new["relation"]:
79+
return False
7780
elif field == "other_prefix":
7881
if (
7982
dict_old["module"] != dict_old["prefix"]

0 commit comments

Comments
 (0)