* Fix regression for creating hints via ctfcli

See #1582 for details. 
Closes https://github.com/CTFd/ctfcli/pull/20.
This commit is contained in:
Kevin Chung
2020-08-06 15:49:29 -04:00
committed by GitHub
parent 5d7e0e39c7
commit f597332c90

View File

@@ -9,9 +9,26 @@ class HintSchema(ma.ModelSchema):
dump_only = ("id", "type", "html")
views = {
"locked": ["id", "type", "challenge", "cost"],
"unlocked": ["id", "type", "challenge", "content", "html", "cost"],
"admin": ["id", "type", "challenge", "content", "html", "cost", "requirements"],
"locked": ["id", "type", "challenge", "challenge_id", "cost"],
"unlocked": [
"id",
"type",
"challenge",
"challenge_id",
"content",
"html",
"cost",
],
"admin": [
"id",
"type",
"challenge",
"challenge_id",
"content",
"html",
"cost",
"requirements",
],
}
def __init__(self, view=None, *args, **kwargs):