Skip to content

Commit

Permalink
Ignore the accepts and rejects columns when calculating the diff betw…
Browse files Browse the repository at this point in the history
…een the two databases. Those fields may always differ.
  • Loading branch information
krihal committed Jun 2, 2023
1 parent 16d1a2c commit 309c1fe
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/cnaas_nac/tools/db_replicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,19 @@ def diff_rows(list_a: list, list_b: list) -> list:
del x['id']
if 'authdate' in x:
del x['authdate']
if 'accepts' in x:
del x['accepts']
if 'rejects' in x:
del x['rejects']
for x in list_b:
if 'id' in x:
del x['id']
if 'authdate' in x:
del x['authdate']
if 'accepts' in x:
del x['accepts']
if 'rejects' in x:
del x['rejects']

for item in list_a:
if item not in list_b:
Expand Down

0 comments on commit 309c1fe

Please sign in to comment.