This commit is contained in:
@@ -49,7 +49,6 @@ namespace Sockeye.Biz
|
||||
else
|
||||
{
|
||||
newObject.Tags = TagBiz.NormalizeTags(newObject.Tags);
|
||||
newObject.CustomFields = JsonUtil.CompactJson(newObject.CustomFields);
|
||||
await ct.TrialLicenseRequest.AddAsync(newObject);
|
||||
await ct.SaveChangesAsync();
|
||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, SockEvent.Created), ct);
|
||||
@@ -91,7 +90,6 @@ namespace Sockeye.Biz
|
||||
}
|
||||
|
||||
putObject.Tags = TagBiz.NormalizeTags(putObject.Tags);
|
||||
putObject.CustomFields = JsonUtil.CompactJson(putObject.CustomFields);
|
||||
await ValidateAsync(putObject, dbObject);
|
||||
if (HasErrors) return null;
|
||||
ct.Replace(dbObject, putObject);
|
||||
@@ -197,10 +195,8 @@ namespace Sockeye.Biz
|
||||
.AddText(obj.Email)
|
||||
.AddText(obj.EmailConfirmCode)
|
||||
.AddText(obj.RejectReason)
|
||||
.AddText(obj.Key)
|
||||
.AddText(obj.Wiki)
|
||||
.AddText(obj.Tags)
|
||||
.AddCustomFields(obj.CustomFields);
|
||||
.AddText(obj.Key)
|
||||
.AddText(obj.Tags);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -222,8 +218,6 @@ namespace Sockeye.Biz
|
||||
//validate users choices for required non custom fields
|
||||
RequiredFieldsValidator.Validate(this, FormCustomization, proposedObj);
|
||||
|
||||
//validate custom fields
|
||||
CustomFieldsValidator.Validate(this, FormCustomization, proposedObj.CustomFields);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -264,7 +258,6 @@ namespace Sockeye.Biz
|
||||
foreach (TrialLicenseRequest w in orderedList)
|
||||
{
|
||||
if (!ReportRenderManager.KeepGoing(jobId)) return null;
|
||||
await PopulateVizFields(w);
|
||||
var jo = JObject.FromObject(w);
|
||||
if (!JsonUtil.JTokenIsNullOrEmpty(jo["CustomFields"]))
|
||||
jo["CustomFields"] = JObject.Parse((string)jo["CustomFields"]);
|
||||
@@ -278,16 +271,7 @@ namespace Sockeye.Biz
|
||||
private VizCache vc = new VizCache();
|
||||
|
||||
|
||||
//populate viz fields from provided object
|
||||
private async Task PopulateVizFields(TrialLicenseRequest o)
|
||||
{
|
||||
if (!vc.Has("customer", o.CustomerId))
|
||||
{
|
||||
vc.Add(await ct.Customer.AsNoTracking().Where(x => x.Id == o.CustomerId).Select(x => x.Name).FirstOrDefaultAsync(), "customer", o.CustomerId);
|
||||
}
|
||||
o.CustomerViz = vc.Get("customer", o.CustomerId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// IMPORT EXPORT
|
||||
|
||||
@@ -62,6 +62,7 @@ namespace Sockeye.Models
|
||||
public virtual DbSet<Purchase> Purchase { get; set; }
|
||||
public virtual DbSet<TrialLicenseRequest> TrialLicenseRequest { get; set; }
|
||||
public virtual DbSet<GZCase> GZCase { get; set; }
|
||||
public virtual DbSet<SubscriptionServer> SubscriptionServer { get; set; }
|
||||
|
||||
//Note: had to add this constructor to work with the code in startup.cs that gets the connection string from the appsettings.json file
|
||||
//and commented out the above on configuring
|
||||
|
||||
Reference in New Issue
Block a user