Skip to content

🐛 Bug Report: Empty teams preferences returns list instead of map #141

@lucasbstn

Description

@lucasbstn

👟 Reproduction steps

Fetch a team by ID where the team has empty preferences.

👍 Expected behavior

After upgrading to Appwrite 1.3, an error is thrown when fetching teams by id or teams preferences.
It seems that an empty list is returned when the preferences are empty. (See this commit)

However if you look at the models defined in this package, the preferences is of type Map<String, dynamic>

👎 Actual Behavior

Throws an error:
type 'List' is not a subtype of type 'Map<String, dynamic>
stackTrace: #0 new Team.fromMap (package:appwrite/src/models/team.dart:39:37)
#1 Teams.get (package:appwrite/services/teams.dart:75:24)

🎲 Appwrite version

Version 2.0.x

💻 Operating system

Linux

🧱 Your Environment

No response

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions