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:
@@ -5,9 +5,15 @@ import (
|
||||
|
||||
"github.com/stashapp/stash/internal/api/loaders"
|
||||
"github.com/stashapp/stash/internal/api/urlbuilders"
|
||||
"github.com/stashapp/stash/pkg/hash/md5"
|
||||
"github.com/stashapp/stash/pkg/models"
|
||||
)
|
||||
|
||||
func (r *movieResolver) Checksum(ctx context.Context, obj *models.Movie) (string, error) {
|
||||
// generate checksum from movie name
|
||||
return md5.FromString(obj.Name), nil
|
||||
}
|
||||
|
||||
func (r *movieResolver) Date(ctx context.Context, obj *models.Movie) (*string, error) {
|
||||
if obj.Date != nil {
|
||||
result := obj.Date.String()
|
||||
|
||||
Reference in New Issue
Block a user