Skip to content

Commit

Permalink
fixup! fix tomuss
Browse files Browse the repository at this point in the history
  • Loading branch information
hatch01 committed Feb 22, 2024
1 parent 9e95143 commit 83273a9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/lyon1tomussclient/lib/src/model/url.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ class URL extends TeachingUnitElement {
URL.fromJSON(var id, Map json, var stats, var line, var column, String user)
: super.fromJson(id, json, stats, line, column, user) {
var props = line[id];
isModifiable = false;
if (props is List && props.isNotEmpty) {
isModifiable = false;
value = props[0].toString();
} else if (json.containsKey("empty_is")) {
isModifiable = false;
value = json["empty_is"];
} else if (json.containsKey("modifiable")) {
isModifiable = json["modifiable"] != 0;
value = "";
} else {
throw ("Couldn't find url in URL object...");
}
Expand Down

0 comments on commit 83273a9

Please sign in to comment.