We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e230ce commit 3991996Copy full SHA for 3991996
src/model.rs
@@ -45,7 +45,8 @@ impl Query {
45
let resource = language
46
.map(|lang| lab.resources.iter().find(|resource| resource.lang == lang))
47
.flatten()
48
- .ok_or(QueryError::NotFoundError("translation".to_string()).extend())?;
+ .or(lab.resources.first())
49
+ .ok_or(QueryError::NotFoundError("resource".to_string()).extend())?;
50
51
let mut result: LabInstance = LabInstance {
52
lang: resource.lang.clone(),
0 commit comments