From 84cd1f1c0a9fe97742f5e939c7b152bc8249b909 Mon Sep 17 00:00:00 2001 From: Cyryl Kuzmin <141822466+cyrylkuzmin@users.noreply.github.com> Date: Thu, 12 Oct 2023 13:56:15 +0200 Subject: [PATCH] Fix start and end dates in EqBlock --- internal/repositories/equipment.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/repositories/equipment.go b/internal/repositories/equipment.go index b19fa7f..6e23baf 100644 --- a/internal/repositories/equipment.go +++ b/internal/repositories/equipment.go @@ -519,8 +519,8 @@ func (r *equipmentRepository) BlockEquipment( // Create a new EquipmentStatus and set startDate, endDate, Equipment and EquipmentStatusName _, err = tx.EquipmentStatus.Create(). SetCreatedAt(time.Now()). - SetEndDate(startDate). - SetStartDate(endDate). + SetEndDate(endDate). + SetStartDate(startDate). SetEquipments(eqToBlock). SetEquipmentStatusName(eqStatusNotAvailable). SetUpdatedAt(time.Now()).