Skip to content

Commit d506b55

Browse files
committed
Added log
1 parent 4caf1f5 commit d506b55

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/schema.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ class CapacityReminder(SQLAlchemyObjectType):
616616
class Meta:
617617
model = CapacityReminderModel
618618
exclude_fields = ("fcm_token",)
619-
619+
620620

621621
# MARK: - Query
622622

@@ -829,6 +829,8 @@ def mutate(self, info, name, net_id, email, encoded_image=None):
829829

830830
if encoded_image:
831831
upload_url = os.getenv("DIGITAL_OCEAN_URL")
832+
if not upload_url:
833+
raise GraphQLError("Upload URL not configured.")
832834
payload = {"bucket": os.getenv("BUCKET_NAME"), "image": encoded_image} # Base64-encoded image string
833835
headers = {"Content-Type": "application/json"}
834836
try:
@@ -1052,8 +1054,6 @@ def mutate(self, info, user_id, workout_goal):
10521054

10531055
db_session.commit()
10541056
return user
1055-
1056-
10571057
class logWorkout(graphene.Mutation):
10581058
class Arguments:
10591059
workout_time = graphene.DateTime(required=True)

0 commit comments

Comments
 (0)