Closed iaggocapitanio1 closed 5 months ago
I think this can be closed because the Bug from #173 is fixed in the SDK generator now: https://github.com/appwrite/sdk-generator/pull/751
Unfortunately, this is a read-only repo as the code is generated by our SDK Generator, and changes made only here would be wiped in the next release.
What does this PR do?
This PR resolves Issue #173 by implementing a fix in the serialization process of the'" error.
User
class. Thelabels
field, which previously could lead to a type cast error when null, has been adjusted to handle null values gracefully. This change ensures that whenlabels
is null, it defaults to an empty list, thereby avoiding the "type 'Null' is not a subtype of type 'ListTest Plan
To verify these changes:
User.fromMap
method correctly handles cases wherelabels
is null.User
objects work as expected, even whenlabels
is null.User
class to ensure compatibility with this change.Related PRs and Issues
This PR directly resolves Issue #173. No other related PRs at this time.
Additional Information
This change is a crucial step towards robust and error-resistant handling of optional fields in data models, enhancing the stability of the Appwrite codebase.
Have you read the Contributing Guidelines on issues?
Yes, I have read the contributing guidelines and ensured that my PR aligns with them.