Skip to content

Commit

Permalink
ManualOverride: Handling for addition only when not root settings #52
Browse files Browse the repository at this point in the history
  • Loading branch information
astrochun committed Sep 23, 2020
1 parent 740b74e commit 9f91cf2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions requiam/manual_override.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,11 @@ def update_dataframe(self, netid, uaid, group, group_type):
for i in range(len(netid)):
loc0 = revised_df.loc[revised_df['netid'] == netid[i]].index
if len(loc0) == 0:
self.log.info(f"Adding entry for {netid[i]}")
revised_df.loc[len(revised_df)] = [netid[i], list(uaid)[i], group]
if group != 'root':
self.log.info(f"Adding entry for {netid[i]}")
revised_df.loc[len(revised_df)] = [netid[i], list(uaid)[i], group]
else:
self.log.info(f"No update needed - root setting and {netid[i]} is not in list")
else:
if group != 'root':
self.log.info(f"Updating entry for {netid[i]}")
Expand Down

0 comments on commit 9f91cf2

Please sign in to comment.