mirror of
https://github.com/ddworken/hishtory.git
synced 2024-11-22 00:03:58 +01:00
Fix condition added in d6a60214a2
to also apply to rows with the go 'empty' value and not just null
This commit is contained in:
parent
c933cbc792
commit
f678a4ffba
@ -52,7 +52,7 @@ func (db *DB) CreateDevice(ctx context.Context, device *Device) error {
|
||||
|
||||
func (db *DB) DevicesForUser(ctx context.Context, userID string) ([]*Device, error) {
|
||||
var devices []*Device
|
||||
tx := db.WithContext(ctx).Where("user_id = ? AND uninstall_date IS NULL", userID).Find(&devices)
|
||||
tx := db.WithContext(ctx).Where("user_id = ? AND (uninstall_date IS NULL OR uninstall_date < '1971-01-01')", userID).Find(&devices)
|
||||
if tx.Error != nil {
|
||||
return nil, fmt.Errorf("tx.Error: %w", tx.Error)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user