Skip to content

Commit

Permalink
[backend/frontend] fix trigger now injects
Browse files Browse the repository at this point in the history
  • Loading branch information
savacano28 committed Sep 13, 2024
1 parent 018a347 commit 8710f02
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,10 @@ public Instant computeInjectDate(Instant source, int speed) {

@JsonProperty("inject_date")
public Optional<Instant> getDate() {
// If a trigger now was executed for this inject, we ignore pauses
// If a trigger now was executed for this inject, we ignore pauses and we set inject inside of a range of execution
if (this.triggerNow) {
this.triggerNow = false;
return Optional.of(now());
return Optional.of(now().minusSeconds(30));
}
return InjectModelHelper.getDate(getExercise(), getScenario(), getDependsOn(), getDependsDuration());
}
Expand Down

0 comments on commit 8710f02

Please sign in to comment.