Skip to content

Commit

Permalink
Small change
Browse files Browse the repository at this point in the history
  • Loading branch information
Dschonas committed Mar 21, 2018
1 parent d8e25cf commit 982704a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions distribution/service/demandservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ def is_start_hop(message_hop, route_start):

def get_start_hop_demand(start_hop):
start_hive = hiveservice.get_hive_by(start_hop.start.id)
start_hive.demand -= 1
start_hive.demand += 1
return start_hive

def get_end_hop_demand(route, hop):
end_hop = route.hops[len(route.hops)-1]
endhop_hive = hiveservice.get_hive_by(end_hop.end.id)
endhop_hive.demand += routeservice.get_route_distance_progress(route, hop)
endhop_hive.demand -= routeservice.get_route_distance_progress(route, hop)
return endhop_hive

0 comments on commit 982704a

Please sign in to comment.