Skip to content

Commit

Permalink
Fix User model to handle null values for password, hash, and hashOpti…
Browse files Browse the repository at this point in the history
…ons - fix appwrite#30
  • Loading branch information
theemaster committed Jan 8, 2024
1 parent 5c20443 commit 4527760
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Appwrite/Models/User.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ string accessedAt
createdAt: map["$createdAt"].ToString(),
updatedAt: map["$updatedAt"].ToString(),
name: map["name"].ToString(),
password: map["password"]?.ToString(),
hash: map["hash"]?.ToString(),
hashOptions: map["hashOptions"]?.ToString(),
password: map.TryGetValue("password", out var password) ? password.ToString() : null,
hash: map.TryGetValue("hash", out var hash) ? hash.ToString() : null,
hashOptions: map.TryGetValue("hashOptions", out var hashOptions) ? hashOptions.ToString() : null,
registration: map["registration"].ToString(),
status: (bool)map["status"],
labels: ((JArray)map["labels"]).ToObject<List<object>>(),
Expand Down

0 comments on commit 4527760

Please sign in to comment.