Skip to content

Commit

Permalink
Fixed residual line upload
Browse files Browse the repository at this point in the history
  • Loading branch information
NickSwainston committed Dec 1, 2023
1 parent 8be24cb commit fbade09
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions psrdb/tables/residual.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def create(
"""
# Loop over the lines and grab the important info to reduce upload size
residual_line_info = []
for residual_line in residual_lines[1:]:
for residual_line in residual_lines:
residual_line = residual_line.rstrip("\n")
# Loop over residual lines and turn into a dict
residual_dict = residual_line_to_dict(residual_line)
Expand All @@ -127,7 +127,10 @@ def create(
'residualLines': residual_chunk,
}
responses.append(self.mutation_graphql())
return responses[-1]
if len(responses) == 0:
return None
else:
return responses[-1]

def process(self, args):
"""Parse the arguments collected by the CLI."""
Expand Down

0 comments on commit fbade09

Please sign in to comment.