Skip to content

Commit

Permalink
I'm so stupid
Browse files Browse the repository at this point in the history
  • Loading branch information
hatch01 committed Feb 22, 2024
1 parent 83273a9 commit ebf45f9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/lyon1tomussclient/lib/src/model/url.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,19 @@ 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];
if (json.containsKey("modifiable")) {
isModifiable = json["modifiable"] != 0;
} else {
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...");
value = "";
}
}

Expand Down

0 comments on commit ebf45f9

Please sign in to comment.