@@ -333,7 +333,7 @@ impl LDNApplication {
333
333
334
334
pub async fn active ( owner : String , repo : String , filter : Option < String > ) -> Result < Vec < ApplicationFile > , LDNError > {
335
335
// Get all active applications from the database.
336
- let active_apps_result = database:: applications:: get_active_applications ( owner, repo) . await ;
336
+ let active_apps_result = database:: applications:: get_active_applications ( Some ( owner) , Some ( repo) ) . await ;
337
337
338
338
// Handle errors in getting active applications.
339
339
let active_apps = match active_apps_result {
@@ -355,7 +355,8 @@ impl LDNApplication {
355
355
if let Some ( app_json) = app_model. application {
356
356
match from_str :: < ApplicationFile > ( & app_json) {
357
357
Ok ( app) => apps. push ( app) ,
358
- Err ( e) => return Err ( LDNError :: Load ( format ! ( "Failed to parse application file: {}" , e) ) ) ,
358
+ //if error, don't push into apps
359
+ Err ( _) => { }
359
360
}
360
361
}
361
362
}
@@ -934,7 +935,7 @@ impl LDNApplication {
934
935
935
936
pub async fn merged ( owner : String , repo : String ) -> Result < Vec < ( ApplicationGithubInfo , ApplicationFile ) > , LDNError > {
936
937
// Retrieve all applications in the main branch from the database.
937
- let merged_apps_result = database:: applications:: get_merged_applications ( owner. clone ( ) , repo. clone ( ) ) . await ;
938
+ let merged_apps_result = database:: applications:: get_merged_applications ( Some ( owner. clone ( ) ) , Some ( repo. clone ( ) ) ) . await ;
938
939
939
940
// Handle errors in getting applications from the main branch.
940
941
let merged_app_models = match merged_apps_result {
@@ -950,7 +951,7 @@ impl LDNApplication {
950
951
if let Some ( app_json) = app_model. application {
951
952
match from_str :: < ApplicationFile > ( & app_json) {
952
953
Ok ( app) => merged_apps. push ( ( ApplicationGithubInfo { sha : app_model. sha . unwrap ( ) , path : app_model. path . unwrap ( ) } , app) ) ,
953
- Err ( e ) => return Err ( LDNError :: Load ( format ! ( "Failed to parse application file: {}" , e ) ) ) ,
954
+ Err ( _ ) => { } ,
954
955
}
955
956
}
956
957
}
@@ -1807,7 +1808,7 @@ Your Datacap Allocation Request has been {} by the Notary
1807
1808
1808
1809
pub async fn cache_renewal_active ( owner : String , repo : String ) -> Result < ( ) , LDNError > {
1809
1810
let active_from_gh: Vec < ApplicationFileWithDate > = LDNApplication :: active_apps_with_last_update ( owner. clone ( ) , repo. clone ( ) , None ) . await ?;
1810
- let active_from_db: Vec < ApplicationModel > = database:: applications:: get_active_applications ( owner. clone ( ) , repo. clone ( ) ) . await . unwrap ( ) ;
1811
+ let active_from_db: Vec < ApplicationModel > = database:: applications:: get_active_applications ( Some ( owner. clone ( ) ) , Some ( repo. clone ( ) ) ) . await . unwrap ( ) ;
1811
1812
1812
1813
let mut db_apps_set: HashSet < String > = HashSet :: new ( ) ;
1813
1814
let mut processed_gh_apps: HashSet < String > = HashSet :: new ( ) ;
@@ -1864,7 +1865,7 @@ Your Datacap Allocation Request has been {} by the Notary
1864
1865
1865
1866
pub async fn cache_renewal_merged ( owner : String , repo : String ) -> Result < ( ) , LDNError > {
1866
1867
let merged_from_gh: Vec < ApplicationFileWithDate > = LDNApplication :: merged_apps_with_last_update ( owner. clone ( ) , repo. clone ( ) , None ) . await ?;
1867
- let merged_from_db: Vec < ApplicationModel > = database:: applications:: get_merged_applications ( owner. clone ( ) , repo. clone ( ) ) . await . unwrap ( ) ;
1868
+ let merged_from_db: Vec < ApplicationModel > = database:: applications:: get_merged_applications ( Some ( owner. clone ( ) ) , Some ( repo. clone ( ) ) ) . await . unwrap ( ) ;
1868
1869
1869
1870
let mut db_apps_set: HashSet < String > = HashSet :: new ( ) ;
1870
1871
let mut processed_gh_apps: HashSet < String > = HashSet :: new ( ) ;
0 commit comments