mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-07-15 10:05:21 +00:00
sonar issues
This commit is contained in:
@ -10,7 +10,7 @@ import tempfile
|
||||
# Import date time module's function
|
||||
from datetime import datetime, time
|
||||
# import Number constant
|
||||
from base.constants import NUMBER
|
||||
from base.constants import NUMBER, time_url
|
||||
# Import Junior's model
|
||||
from junior.models import Junior, JuniorPoints
|
||||
|
||||
@ -45,8 +45,9 @@ def upload_image_to_alibaba(image, filename):
|
||||
return f"https://{settings.ALIYUN_OSS_BUCKET_NAME}.{settings.ALIYUN_OSS_ENDPOINT}/{new_filename}"
|
||||
|
||||
|
||||
def real_time(timezone='Asia/Riyadh'):
|
||||
url = f'http://worldtimeapi.org/api/timezone/{timezone}'
|
||||
def real_time():
|
||||
"""fetch real time from world time api"""
|
||||
url = time_url
|
||||
response = requests.get(url)
|
||||
if response.status_code == 200:
|
||||
data = response.json()
|
||||
|
Reference in New Issue
Block a user