Skip to content

Commit

Permalink
fix #1254
Browse files Browse the repository at this point in the history
  • Loading branch information
alainm23 committed May 11, 2024
1 parent bdbe060 commit 46246fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions core/Objects/Item.vala
Original file line number Diff line number Diff line change
Expand Up @@ -1527,4 +1527,12 @@ public class Objects.Item : Objects.BaseObject {

return project.is_archived;
}

public bool exists_project (Objects.Project project) {
if (has_parent) {
return parent.exists_project (project);
}

return project_id == project.id;
}
}
2 changes: 1 addition & 1 deletion core/Services/Database.vala
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,7 @@ public class Services.Database : GLib.Object {
Gee.ArrayList<Objects.Item> return_value = new Gee.ArrayList<Objects.Item> ();
lock (_items) {
foreach (Objects.Item item in items) {
if (item.project_id == project.id) {
if (item.exists_project (project)) {
return_value.add (item);
}
}
Expand Down

0 comments on commit 46246fc

Please sign in to comment.