Skip to content

Commit

Permalink
change prints
Browse files Browse the repository at this point in the history
  • Loading branch information
jefer94 committed Sep 11, 2024
1 parent 1a38364 commit 757dca1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 56 deletions.
25 changes: 25 additions & 0 deletions breathecode/authenticate/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2054,8 +2054,33 @@ async def save_google_token(request):
logger.debug("Google callback just landed")
logger.debug(request.query_params)

print(111111111111111111111)
print(111111111111111111111)
print(111111111111111111111)
print(111111111111111111111)
print(111111111111111111111)
print(111111111111111111111)
print(111111111111111111111)
print(111111111111111111111)
print(111111111111111111111)
print(111111111111111111111)
logger.info(111111111111111111111)
logger.info(111111111111111111111)
logger.info(111111111111111111111)
logger.info(111111111111111111111)
logger.info(111111111111111111111)
logger.info(111111111111111111111)
logger.info(111111111111111111111)
logger.info(111111111111111111111)
logger.info(111111111111111111111)
logger.info(111111111111111111111)

error = request.query_params.get("error", False)
print(error)
logger.info(error)
error_description = request.query_params.get("error_description", "")
print(error_description)
logger.info(error_description)
if error:
raise APIException("Google OAuth: " + error_description)

Expand Down
56 changes: 0 additions & 56 deletions breathecode/events/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,29 +48,21 @@ def get_related_resources():

def process_i_owe_you(i_owe_them: QuerySet[AbstractIOweYou]):
for i_owe_you in i_owe_them:
print("get in", i_owe_you)
if (
i_owe_you.selected_cohort_set
and i_owe_you.selected_cohort_set.cohorts.first().academy
and i_owe_you.selected_cohort_set.cohorts.first().academy not in academies
):
print(4, i_owe_you.selected_cohort_set.cohorts.first().academy)
academies.append(i_owe_you.selected_cohort_set.cohorts.first().academy)

if i_owe_you.selected_cohort_set and i_owe_you.selected_cohort_set.cohorts.first() not in cohorts:
print(5, i_owe_you.selected_cohort_set.cohorts.first())
cohorts.append(i_owe_you.selected_cohort_set.cohorts.first())

if (
i_owe_you.selected_cohort_set
and i_owe_you.selected_cohort_set.cohorts.first().syllabus_version
and i_owe_you.selected_cohort_set.cohorts.first().syllabus_version.syllabus not in syllabus
):
print(
6,
i_owe_you.selected_cohort_set.cohorts.first().syllabus_version.syllabus,
i_owe_you.selected_cohort_set.cohorts.first().academy,
)
syllabus.append(
{
"syllabus": i_owe_you.selected_cohort_set.cohorts.first().syllabus_version.syllabus,
Expand All @@ -79,20 +71,17 @@ def process_i_owe_you(i_owe_them: QuerySet[AbstractIOweYou]):
)

if i_owe_you.selected_event_type_set and i_owe_you.selected_event_type_set.academy not in academies:
print(7, i_owe_you.selected_event_type_set.academy)
academies.append(i_owe_you.selected_event_type_set.academy)

if (
i_owe_you.selected_mentorship_service_set
and i_owe_you.selected_mentorship_service_set.academy not in academies
):
print(8, i_owe_you.selected_mentorship_service_set.academy)
academies.append(i_owe_you.selected_mentorship_service_set.academy)

if i_owe_you.selected_event_type_set:
for event_type in i_owe_you.selected_event_type_set.event_types.all():
if event_type.id not in ids:
print(9, event_type.id)
ids.append(event_type.id)

syllabus = []
Expand Down Expand Up @@ -142,51 +131,6 @@ def process_i_owe_you(i_owe_them: QuerySet[AbstractIOweYou]):
process_i_owe_you(subscriptions)
process_i_owe_you(plan_financings)

print(
-11,
[
{
"id": x.id,
"slug": x.slug,
"name": x.name,
}
for x in academies
],
)

print(
-22,
[
{
"id": x.id,
"slug": x.slug,
"name": x.name,
}
for x in cohorts
],
)

print(
-33,
[
{
"syllabus": {
"id": x["syllabus"].id,
"slug": x["syllabus"].slug,
"name": x["syllabus"].name,
},
"academy": {
"id": x["academy"].id,
"slug": x["academy"].slug,
"name": x["academy"].name,
},
}
for x in syllabus
],
)
print(-44, subscriptions)
print(-55, plan_financings)

return academies, cohorts, syllabus, ids

def my_events():
Expand Down

0 comments on commit 757dca1

Please sign in to comment.