Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Readarr/commit/eaff6dc18f55b7d3a93336ef645d37a907ffd790
You should set ROOT_URL correctly, otherwise the web may not work correctly.
4 changed files with
11 additions and
10 deletions
@ -101,7 +101,7 @@ namespace NzbDrone.Core.Test.Datastore
[Test]
public void update_field_should_only_update_that _filed( )
public void set_fields_should_only_update_selected _filed( )
{
var childModel = new JobDefinition
{
@ -117,14 +117,12 @@ namespace NzbDrone.Core.Test.Datastore
childModel . Name = "B" ;
childModel . Interval = 0 ;
Subject . Update Fields( childModel , t = > t . Name ) ;
Subject . Set Fields( childModel , t = > t . Name ) ;
Db . All < JobDefinition > ( ) . Single ( ) . Type . Should ( ) . Be ( "Address" ) ;
Db . All < JobDefinition > ( ) . Single ( ) . Name . Should ( ) . Be ( "B" ) ;
Db . All < JobDefinition > ( ) . Single ( ) . Interval . Should ( ) . Be ( 12 ) ;
}
}
}
@ -26,7 +26,7 @@ namespace NzbDrone.Core.Datastore
void Purge ( ) ;
bool HasItems ( ) ;
void DeleteMany ( IEnumerable < int > ids ) ;
void UpdateFields< TKey > ( TModel model , Expression < Func < TModel , TKey > > onlyField s) ;
void SetFields( TModel model , params Expression < Func < TModel , object > > [ ] propertie s) ;
}
public class BasicRepository < TModel > : IBasicRepository < TModel > where TModel : ModelBase , new ( )
@ -148,16 +148,19 @@ namespace NzbDrone.Core.Datastore
return Count ( ) > 0 ;
}
public void UpdateFields< TKey > ( TModel model , Expression < Func < TModel , TKey > > onlyField s)
public void SetFields( TModel model , params Expression < Func < TModel , object > > [ ] propertie s)
{
if ( model . Id = = 0 )
{
throw new InvalidOperationException ( "Attempted to updated model without ID" ) ;
}
_dataMapper . Update < TModel > ( model , m = > m . Id = = model . Id ) ;
// _database.UpdateOnly(model, onlyFields, m => m.Id == model.Id);
_dataMapper . Update < TModel > ( )
. Where ( c = > c . Id = = model . Id )
. ColumnsIncluding ( properties )
. Entity ( model )
. Execute ( ) ;
}
}
}
@ -43,7 +43,7 @@ namespace NzbDrone.Core.Tv
public void SetSeriesType ( int seriesId , SeriesTypes seriesType )
{
Update Fields( new Series { Id = seriesId , SeriesType = seriesType } , s = > s . SeriesType ) ;
Set Fields( new Series { Id = seriesId , SeriesType = seriesType } , s = > s . SeriesType ) ;
}
}
}