fix: if a field changed, set its changes
This commit is contained in:
parent
e3022b8587
commit
8d20659a5b
|
@ -84,22 +84,27 @@ func (i ImportServiceDefault) SaveImport(ctx context.Context, metadata ImportMet
|
||||||
changed := false
|
changed := false
|
||||||
|
|
||||||
if __import.UserID != metadata.UserID {
|
if __import.UserID != metadata.UserID {
|
||||||
|
__import.UserID = metadata.UserID
|
||||||
changed = true
|
changed = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if __import.Status != metadata.Status {
|
if __import.Status != metadata.Status {
|
||||||
|
__import.Status = metadata.Status
|
||||||
changed = true
|
changed = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if __import.Progress != metadata.Progress {
|
if __import.Progress != metadata.Progress {
|
||||||
|
__import.Progress = metadata.Progress
|
||||||
changed = true
|
changed = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if __import.Protocol != metadata.Protocol {
|
if __import.Protocol != metadata.Protocol {
|
||||||
|
__import.Protocol = metadata.Protocol
|
||||||
changed = true
|
changed = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if __import.ImporterIP != metadata.ImporterIP {
|
if __import.ImporterIP != metadata.ImporterIP {
|
||||||
|
__import.ImporterIP = metadata.ImporterIP
|
||||||
changed = true
|
changed = true
|
||||||
}
|
}
|
||||||
if changed {
|
if changed {
|
||||||
|
|
Loading…
Reference in New Issue