flightlog / flsserver

Flight Logging System Server
MIT License
6 stars 1 forks source link

UnitType issue in delivery item creation #97

Closed pschuler78 closed 6 years ago

pschuler78 commented 6 years ago

it seems that the UnitType is not set in delivery item, as the server logs an error: DbEntityValidationException: FLS.Server.Data.DbEntities.DeliveryItem failed validation - UnitType : The UnitType field is required. in DeliveryCreationJob.ProcessDeliveries => DeliveryService.CreateDeliveriesFromFlights => FLSDataEntities.SaveChanges

pschuler78 commented 6 years ago

Fixed issue direct within database, as the current server code covers all unit type related assignments.

pschuler78 commented 6 years ago

Used following SQL command:

UPDATE [dbo].[AccountingRuleFilters]
   SET [AccountingUnitTypeId] = 10
 WHERE AccountingUnitTypeId is null
 and AccountingRuleFilterTypeId <> 10