mod_incidents_handling: run cleanup and save the store when a new object is added.
authorMarco Cirillo <maranda@lightwitch.org>
Sat, 02 Mar 2013 11:47:20 +0100
changeset 918 dec71c31fb78
parent 917 d3497b81a3b5
child 919 7d72fb45b1e4
mod_incidents_handling: run cleanup and save the store when a new object is added.
mod_incidents_handling/incidents_handling/mod_incidents_handling.lua
--- a/mod_incidents_handling/incidents_handling/mod_incidents_handling.lua	Tue Feb 26 16:11:20 2013 +0100
+++ b/mod_incidents_handling/incidents_handling/mod_incidents_handling.lua	Sat Mar 02 11:47:20 2013 +0100
@@ -146,6 +146,7 @@
 		}
 		
 		self[new_object.data.id.text] = new_object
+		self:clean() ; self:save()
 		return new_object.data.id.text
 	else return false end
 end