Skip to content

Commit 4b66034

Browse files
committed
fixed youtube b64 thumbnail null issue
1 parent a883b11 commit 4b66034

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/mutations/create_youtube_video.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ class Arguments:
88
title = String(required=True)
99
description = String(required=True)
1010
thumbnail = String(required=True)
11-
b64_thumbnail = String(required=True)
11+
b64_thumbnail = String(required=False)
1212
url = String(required=True)
1313
published_at = String(required=True)
1414
duration = String(required=True)
1515

1616
youtube_video = Field(lambda: YoutubeVideoType)
1717

18-
def mutate(self, info, id, title, description, thumbnail, b64_thumbnail, url, published_at, duration):
18+
def mutate(self, info, id, title, description, thumbnail, url, published_at, duration, b64_thumbnail=None):
1919
video_data = {
2020
"id": id,
2121
"title": title,

src/types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ class YoutubeVideoType(ObjectType):
152152
- id: The YouTube video ID (optional).
153153
- title: The title of the video.
154154
- description: The description of the video.
155-
- thumbnail: The URL of the video's thumbnail.
155+
- thumbnail: The URL of the video's thumbnail. (optional)
156156
- url: The URL to the video.
157157
- published_at: The date and time the video was published.
158158
- duration: The duration of the video (optional).
@@ -162,7 +162,7 @@ class YoutubeVideoType(ObjectType):
162162
title = String(required=True)
163163
description = String(required=True)
164164
thumbnail = String(required=True)
165-
b64_thumbnail = String(required=True)
165+
b64_thumbnail = String(required=False)
166166
url = String(required=True)
167167
published_at = String(required=True)
168168
duration = String(required=False)

0 commit comments

Comments
 (0)