Skip to content

Commit

Permalink
Add check for amount when using node_type
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Powers committed Oct 30, 2024
1 parent 972aa22 commit 9fdd021
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions chi/lease.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,10 @@ def add_node_reservation(
reservation_list=self.node_reservations, node_name=node.name
)
else:
if not amount or not (node_type or node_name):
raise CHIValueError(
"You must specify amount and either node_type or node_name"
)
add_node_reservation(
reservation_list=self.node_reservations,
count=amount,
Expand Down

0 comments on commit 9fdd021

Please sign in to comment.