This commit is contained in:
@@ -50,8 +50,6 @@ namespace Sockeye.Biz
|
||||
{
|
||||
await GenerateKey(newObject);
|
||||
if (HasErrors) return null;
|
||||
|
||||
|
||||
newObject.Tags = TagBiz.NormalizeTags(newObject.Tags);
|
||||
await ct.License.AddAsync(newObject);
|
||||
await ct.SaveChangesAsync();
|
||||
@@ -487,22 +485,24 @@ namespace Sockeye.Biz
|
||||
internal async Task GenerateKey(License l)
|
||||
{
|
||||
|
||||
if(l.CustomerId!=null){
|
||||
l.CustomerViz=await ct.Customer.AsNoTracking().Where(x => x.Id == l.CustomerId).Select(x => x.Name).FirstOrDefaultAsync();
|
||||
if (l.CustomerId != null)
|
||||
{
|
||||
l.CustomerViz = await ct.Customer.AsNoTracking().Where(x => x.Id == l.CustomerId).Select(x => x.Name).FirstOrDefaultAsync();
|
||||
}
|
||||
|
||||
switch(l.PGroup){
|
||||
case ProductGroup.RavenPerpetual:
|
||||
|
||||
switch (l.PGroup)
|
||||
{
|
||||
case ProductGroup.RavenPerpetual:
|
||||
case ProductGroup.RavenSubscription:
|
||||
{
|
||||
RavenKeyFactory.GenerateAndSetRavenKey(l);
|
||||
}
|
||||
break;
|
||||
{
|
||||
RavenKeyFactory.GenerateAndSetRavenKey(l);
|
||||
}
|
||||
break;
|
||||
case ProductGroup.AyaNova7:
|
||||
{
|
||||
KeyFactory.GenerateAndSetV7Key(l);
|
||||
}
|
||||
break;
|
||||
{
|
||||
KeyFactory.GenerateAndSetV7Key(l);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user