Skip to content

Commit

Permalink
Support of --replace on basket-handled data imports. Integrated in Up…
Browse files Browse the repository at this point in the history
…dateDataConfiguration, since --replace handles the same parameters like --update. The parameter that decides is delete_data. This because like this it's equivalent to the delete_data parameter on import.
  • Loading branch information
signedav committed Dec 7, 2023
1 parent 214b3e3 commit 97a5de5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modelbaker/iliwrapper/ili2dbconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,14 +380,18 @@ def __init__(self):
super().__init__()
self.xtffile = ""
self.dataset = ""
self.delete_data = False
self.with_importtid = False
self.with_importbid = False

def to_ili2db_args(self, extra_args=[], with_action=True):
args = list()

if with_action:
self.append_args(args, ["--update"])
if self.delete_data:
self.append_args(args, ["--replace"])
else:
self.append_args(args, ["--update"])

self.append_args(args, extra_args)

Expand Down

0 comments on commit 97a5de5

Please sign in to comment.