func GetStudioName(reader models.StudioReader, gallery *models.Gallery) (string, error) {
	if gallery.StudioID.Valid {
		studio, err := reader.Find(int(gallery.StudioID.Int64))
		if err != nil {
			return "", err
		}

		if studio != nil {
			return studio.Name.String, nil
		}
	}

	return "", nil
}
// GetStudioName returns the name of the provided gallery's studio. It returns an
// empty string if there is no studio assigned to the gallery.
GetStudioName returns the name of the provided gallery's studio. It returns an
empty string if there is no studio assigned to the gallery.
// GetStudioName returns the name of the provided gallery ' s studio . It returns an // empty string if there is no studio assigned to the gallery .
func GetStudioName(reader models.StudioReader, gallery *models.Gallery) (string, error) {
	if gallery.StudioID.Valid {
		studio, err := reader.Find(int(gallery.StudioID.Int64))
		if err != nil {
			return "", err
		}
		if studio != nil {
			return studio.Name.String, nil
		}
	}
	return "", nil
}
func GetStudioName ( reader models . StudioReader , gallery * models . Gallery ) ( string , error ) { if gallery . StudioID . Valid { studio , err := reader . Find ( int ( gallery . StudioID . Int64 ) ) if err != nil { return " " , err } if studio != nil { return studio . Name . String , nil } } return " " , nil }
GetStudioName returns the name of the provided gallery's studio.
GetStudioName returns the name of the provided gallery ' s studio .