Changeset 6426 for branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HiveService.cs
- Timestamp:
- 06/16/11 12:39:32 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HiveService.cs
r6419 r6426 98 98 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client, HiveRoles.Slave); 99 99 //trans.UseTransaction(() => { // cneumuel: try without transaction 100 101 102 100 jobData.LastUpdate = DateTime.Now; 101 dao.UpdateJob(job); 102 dao.UpdateJobData(jobData); 103 103 //}, false, true); 104 104 } … … 285 285 plugin.UserId = author.UserId; 286 286 plugin.DateCreated = DateTime.Now; 287 if (!plugin.IsLocal) { 288 var existing = dao.GetPlugins(x => x.Hash != null && !x.IsLocal).Where(x => x.Hash.SequenceEqual(plugin.Hash)); 289 290 if (existing.Count() > 0) { 291 // a plugin with the same name and version already exists. 292 throw new FaultException<PluginAlreadyExistsFault>(new PluginAlreadyExistsFault(existing.Single().Id)); 293 } 294 } 287 288 var existing = dao.GetPlugins(x => x.Hash != null).Where(x => x.Hash.SequenceEqual(plugin.Hash)); 289 if (existing.Count() > 0) { 290 // a plugin already exists. 291 throw new FaultException<PluginAlreadyExistsFault>(new PluginAlreadyExistsFault(existing.Single().Id)); 292 } 293 295 294 Guid pluginId = dao.AddPlugin(plugin); 296 295 foreach (PluginData pluginData in pluginDatas) { … … 309 308 public IEnumerable<Plugin> GetPlugins() { 310 309 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client, HiveRoles.Slave); 311 return dao.GetPlugins(x => x. IsLocal == false);310 return dao.GetPlugins(x => x.Hash != null); 312 311 } 313 312
Note: See TracChangeset
for help on using the changeset viewer.