Skip to content

Commit

Permalink
Merge pull request #462 from opengisch/include-public-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
suricactus authored Aug 12, 2022
2 parents 74592e4 + 5f3c80e commit 6347ff1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions qfieldsync/core/cloud_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,16 +281,15 @@ def logout(self) -> QNetworkReply:

return reply

def get_projects(self, should_include_public: bool = True) -> QNetworkReply:
def get_projects(self, should_include_public: bool = False) -> QNetworkReply:
"""Get QFieldCloud projects"""
return self.cloud_get(
"projects", {"include-public": "true" if should_include_public else "false"}
)
params = {"include-public": "1"} if should_include_public else {}
return self.cloud_get("projects", params)

def get_projects_not_async(self, should_include_public: bool = False) -> List[Dict]:
"""Get QFieldCloud projects synchronously"""
headers = {"Authorization": "token {}".format(self._token)}
params = {"include-public": should_include_public}
params = {"include-public": "1"} if should_include_public else {}

response = requests.get(
self._prepare_uri("projects").toString(),
Expand Down

0 comments on commit 6347ff1

Please sign in to comment.