@@ -31,7 +31,10 @@ public partial class GameDatabaseContext // Photos
3131 . Include ( p => p . Photo ! . Publisher . Statistics )
3232 . Include ( p => p . Photo ! . Level )
3333 . Include ( p => p . Photo ! . Level ! . Publisher )
34- . Include ( p => p . Photo ! . Level ! . Publisher ! . Statistics ) ;
34+ . Include ( p => p . Photo ! . Level ! . Publisher ! . Statistics )
35+ . Include ( p => p . Photo ! . LargeAsset )
36+ . Include ( p => p . Photo ! . MediumAsset )
37+ . Include ( p => p . Photo ! . SmallAsset ) ;
3538
3639 public GamePhoto UploadPhoto ( IPhotoUpload photo , IEnumerable < IPhotoUploadSubject > subjects , GameUser publisher , GameLevel ? level )
3740 {
@@ -85,7 +88,7 @@ public GamePhoto UploadPhoto(IPhotoUpload photo, IEnumerable<IPhotoUploadSubject
8588 }
8689 catch ( Exception ex )
8790 {
88- this . _logger . LogWarning ( BunkumCategory . UserPhotos , $ "Could not parse { subject . DisplayName } 's photo bounds: { ex . GetType ( ) } { ex . Message } ") ;
91+ this . _logger . LogWarning ( BunkumCategory . UserPhotos , $ "Could not parse { subject . DisplayName } 's photo bounds: { ex . GetType ( ) } - { ex . Message } ") ;
8992 }
9093
9194 GameUser ? subjectUser = string . IsNullOrWhiteSpace ( subject . Username ) ? null : this . GetUserByUsername ( subject . Username ) ;
@@ -179,7 +182,7 @@ public void MigratePhotoSubjects(GamePhoto photo, bool saveChanges)
179182
180183 public void RemovePhoto ( GamePhoto photo )
181184 {
182- foreach ( GameUser subjectUser in this . GetUsersInPhoto ( photo ) )
185+ foreach ( GameUser subjectUser in this . GetUsersInPhoto ( photo ) . ToArray ( ) )
183186 {
184187 this . WriteEnsuringStatistics ( subjectUser , ( ) =>
185188 {
0 commit comments