-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(scripts): add script to unstage all data
- Loading branch information
Showing
5 changed files
with
25 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,6 +77,8 @@ | |
"tacrolimus", | ||
"tramadol", | ||
"unscrollable", | ||
"unstage", | ||
"unstaged", | ||
"userdata", | ||
"voriconazole" | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from common.get_data import get_data | ||
from common.write_data import write_data | ||
from common.constants import SCRIPT_POSTFIXES | ||
|
||
def unstage_data(): | ||
data = get_data() | ||
for table_name in data.keys(): | ||
for item in data[table_name]: | ||
if 'isStaged' in item.keys(): | ||
item['isStaged'] = False | ||
write_data(data, postfix=SCRIPT_POSTFIXES['unstage']) | ||
|
||
if __name__ == '__main__': | ||
unstage_data() |