Skip to content

Commit 1b8750f

Browse files
committed
Updated dependencies for depointerized TimeProfile from/to dates
1 parent b02a9b1 commit 1b8750f

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

device/doors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ func checkTimeProfile(deviceID, cardNumber uint32, profileID uint8, profile type
420420
now := types.NewHHmm(time.Now().Hour(), time.Now().Minute())
421421
today := types.Date(time.Now())
422422

423-
if profile.From == nil || profile.To == nil || today.Before(*profile.From) || today.After(*profile.To) {
423+
if profile.From.IsZero() || profile.To.IsZero() || today.Before(profile.From) || today.After(profile.To) {
424424
return fmt.Errorf("card %v: time profile %v on device %v is not valid for %v", cardNumber, profileID, deviceID, today)
425425
}
426426

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.22
55
toolchain go1.22.0
66

77
require (
8-
github.com/uhppoted/uhppote-core v0.8.9-0.20240604153627-4993b61f3ba6
9-
github.com/uhppoted/uhppoted-lib v0.8.9-0.20240604154440-5ce365632a38
8+
github.com/uhppoted/uhppote-core v0.8.9-0.20240605161320-cd6c0e95347b
9+
github.com/uhppoted/uhppoted-lib v0.8.9-0.20240605161930-54dea6fc78b1
1010
golang.org/x/sys v0.21.0
1111
)

go.sum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ github.com/uhppoted/uhppote-core v0.8.9-0.20240531170136-432a5b0fbb8b h1:alKlb6o
112112
github.com/uhppoted/uhppote-core v0.8.9-0.20240531170136-432a5b0fbb8b/go.mod h1:Q+DHtT8s74efLs2b0eF20DRBUL9yBkySwaTQ+0lsEVM=
113113
github.com/uhppoted/uhppote-core v0.8.9-0.20240604153627-4993b61f3ba6 h1:ltffa7TfO+mbR6VLURhlG/6ChkQSglpbN13wUYvQhUM=
114114
github.com/uhppoted/uhppote-core v0.8.9-0.20240604153627-4993b61f3ba6/go.mod h1:Q+DHtT8s74efLs2b0eF20DRBUL9yBkySwaTQ+0lsEVM=
115+
github.com/uhppoted/uhppote-core v0.8.9-0.20240605161320-cd6c0e95347b h1:8+6eR7uTFE5cD3tdbOjat2NoI/zS3Pj1eK4WXZvQweA=
116+
github.com/uhppoted/uhppote-core v0.8.9-0.20240605161320-cd6c0e95347b/go.mod h1:Q+DHtT8s74efLs2b0eF20DRBUL9yBkySwaTQ+0lsEVM=
115117
github.com/uhppoted/uhppoted-lib v0.7.3-0.20220128210643-c4d9a4bc1660 h1:BRLml03IH5I0wzAOaKrmQ3V/wbRdoBmRb/sBX+uX7Nw=
116118
github.com/uhppoted/uhppoted-lib v0.7.3-0.20220128210643-c4d9a4bc1660/go.mod h1:HQChamquwltZIqT+tmMfDLTjaqLXEsokPQf8Utxi9MA=
117119
github.com/uhppoted/uhppoted-lib v0.7.3-0.20220531204140-34d8876e5e89 h1:Cwp9o2KzliY85ERUkV9Z9RBFjVotzHLMAQ89EBblQcg=
@@ -256,6 +258,8 @@ github.com/uhppoted/uhppoted-lib v0.8.9-0.20240531170312-cb08695b7cc2 h1:Slbb2pw
256258
github.com/uhppoted/uhppoted-lib v0.8.9-0.20240531170312-cb08695b7cc2/go.mod h1:pg8dPLgY+Faru4Zc5Et0Q/bq5lbKU420/VdXQLkkjCE=
257259
github.com/uhppoted/uhppoted-lib v0.8.9-0.20240604154440-5ce365632a38 h1:q42QPpm0uFtd00SU1GIbwGhwolCEZa0BNKJUVYc0BKw=
258260
github.com/uhppoted/uhppoted-lib v0.8.9-0.20240604154440-5ce365632a38/go.mod h1:MsC5n/1vS80L/S7wcpzpOPeR8UsUNKOMmdOWs/vi5Hg=
261+
github.com/uhppoted/uhppoted-lib v0.8.9-0.20240605161930-54dea6fc78b1 h1:T1tGRfDa/jN9apkZtiid5FmHMMxjNXuazp7Mi9J4K/U=
262+
github.com/uhppoted/uhppoted-lib v0.8.9-0.20240605161930-54dea6fc78b1/go.mod h1:di+eHPBWGIN6UwtmjXNPzmKZyoE8VL7f1KDbbw1cFzQ=
259263
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0=
260264
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
261265
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k=

0 commit comments

Comments
 (0)