Skip to content

Commit

Permalink
[BUG] fix public adventure page (#4900)
Browse files Browse the repository at this point in the history
**Description**
The adventures table requires the `public` field to be a boolean. This fixes the issue.

**How to test**
- go to the `for-teachers` page
- click on  `public adventures`
- everything should work; also on alpha!
  • Loading branch information
hasan-sh authored Dec 13, 2023
1 parent a00fe99 commit ec4ee18
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions translations/ar/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1260,6 +1260,9 @@ msgstr "ليس لديك حساب؟"
msgid "no_accounts"
msgstr "لا يوجد حسابات ليتم انشاءها."

msgid "no_adventures_yet"
msgstr "لا يوجد مغامرات عامة بعد..."

#, fuzzy
msgid "no_certificate"
msgstr "This user hasn't earned the Hedy Certificate of Completion"
Expand Down Expand Up @@ -1512,6 +1515,9 @@ msgstr "هل تريد الإنضمام الى هذا الصف؟"
msgid "public"
msgstr "Public"

msgid "public_adventures"
msgstr "المغامرات العامة"

msgid "public_invalid"
msgstr "اختيار الاتفاقية هذا غير صالح"

Expand Down Expand Up @@ -2178,12 +2184,6 @@ msgstr "اختر العلامة"
msgid "Unused Variable"
msgstr "You defined the variable {variable_name} on line {line_number}, but you did not use it."

msgid "no_adventures_yet"
msgstr ""

msgid "public_adventures"
msgstr ""

msgid "title_public-adventures"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions translations/en/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ msgid "no_accounts"
msgstr "There are no accounts to create."

msgid "no_adventures_yet"
msgstr ""
msgstr "There are no public adventures yet..."

msgid "no_certificate"
msgstr "This user hasn't earned the Hedy Certificate of Completion"
Expand Down Expand Up @@ -1256,7 +1256,7 @@ msgid "public"
msgstr "Public"

msgid "public_adventures"
msgstr ""
msgstr "Public adventures"

msgid "public_invalid"
msgstr "This agreement selection is invalid"
Expand Down
2 changes: 1 addition & 1 deletion website/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ def batch_get_adventures(self, adventure_ids):
return ADVENTURES.batch_get(keys) if keys else {}

def get_public_adventures(self):
return ADVENTURES.get_many({"public": 1})
return ADVENTURES.get_many({"public": True})

def delete_adventure(self, adventure_id):
ADVENTURES.delete({"id": adventure_id})
Expand Down

0 comments on commit ec4ee18

Please sign in to comment.