Skip to content

Commit

Permalink
resolve merge conflict errors
Browse files Browse the repository at this point in the history
  • Loading branch information
raftmsohani committed Oct 2, 2024
1 parent bf2d288 commit a1c4631
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
3 changes: 1 addition & 2 deletions tdrs-backend/tdpservice/data_files/admin/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ def get_actions(self, request):
"""Return the actions."""
actions = super().get_actions(request)
if not request.user.groups.filter(name__in=["OFA System Admin", "OFA Admin"]).exists():
if "reparse" in actions:
del actions["reparse"]
actions.pop("reparse", None)
else:
if "reparse" not in actions:
actions["reparse"] = (self.reparse, "reparse", "Reparse selected data files)")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,15 @@ $(window).on('load', function() {
//your code here
console.log('loaded');
var submitBtn=document.querySelector('button[type=submit]'); // add the first listener
console.log(submitBtn.parentNode);
var theForm = submitBtn.parentNode.parentNode;

for (var i = 0; i < theForm.childNodes.length; i++) {
console.log(theForm.childNodes[i].className)
if (theForm.childNodes[i].className == "actions") {
form_header = theForm.childNodes[i];
break;
}
}
for (var i = 0; i < form_header.childNodes.length; i++) {
console.log(form_header.childNodes[i].className)
if (form_header.childNodes[i].className == "action-counter") {
number_of_files = form_header.childNodes[i];
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,10 @@ def handle(self, *args, **options):
selected_files = [int(file) for file in selected_files[0].split(',')] if selected_files else None
new_indices = reparse_all is True

# have to check if the selected_files is not None
# Option that can only be specified by calling `handle` directly and passing it.
testing = options.get('testing', False)
##

args_passed = fiscal_year is not None or fiscal_quarter is not None or reparse_all or selected_files

if not args_passed:
Expand All @@ -330,7 +333,8 @@ def handle(self, *args, **options):
fmt_str = f"ALL ({num_files})" if reparse_all else f"({num_files})"
continue_msg += "\nThese options will delete and reparse {0} datafiles.".format(fmt_str)

self._handle_input(testing, continue_msg)
if not selected_files:
self._handle_input(testing, continue_msg)

system_user, created = User.objects.get_or_create(username='system')
if created:
Expand Down

0 comments on commit a1c4631

Please sign in to comment.