Skip to content

Commit eca11a1

Browse files
committed
updates
1 parent 1c73533 commit eca11a1

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

demo_all_astro_data.py

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
#PART 2 : CALCULATE ALL DATA
1717
#-----------------------------------
1818

19+
#HOROSCOPE PREDICTIONS
20+
horoscopePredictions = Calculate.HoroscopePredictions(birth_time, "Empty")
21+
print(json.dumps(horoscopePredictions, indent=4))
22+
1923
#PLANETS
2024
allPlanetDataList = Calculate.AllPlanetData(PlanetName.Sun, birth_time)
2125
print(json.dumps(allPlanetDataList, indent=4))

vedastro/calculate.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ def _make_request(cls, endpoint, params):
2727
if "Status" in data and data["Status"] == "Fail":
2828
print(data["Payload"])
2929
if "Payload" in data and data["Payload"]:
30-
return list(data["Payload"].values())[0]
30+
if isinstance(data["Payload"], list):
31+
return data["Payload"]
32+
else:
33+
return list(data["Payload"].values())[0]
3134
else:
3235
raise ValueError("Payload is missing or empty")
3336
else:

0 commit comments

Comments
 (0)