mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
SQLite model refactoring, part 2 (#3839)
* Treat empty image input as null * Add validation to models.Date * Allow zero dates in database * Make scene_markers.scene_id non-nullable * Drop scraped_items table * Remove movie/studio checksum * Add migration notes --------- Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
@@ -370,8 +370,10 @@ func getScenePartial(scene *models.Scene, scraped *scraper.ScrapedScene, fieldOp
|
||||
}
|
||||
if scraped.Date != nil && (scene.Date == nil || scene.Date.String() != *scraped.Date) {
|
||||
if shouldSetSingleValueField(fieldOptions["date"], scene.Date != nil) {
|
||||
d := models.NewDate(*scraped.Date)
|
||||
partial.Date = models.NewOptionalDate(d)
|
||||
d, err := models.ParseDate(*scraped.Date)
|
||||
if err == nil {
|
||||
partial.Date = models.NewOptionalDate(d)
|
||||
}
|
||||
}
|
||||
}
|
||||
if scraped.Details != nil && (scene.Details != *scraped.Details) {
|
||||
|
||||
Reference in New Issue
Block a user