[isidorus-cvs] r904 - in branches/gdl-frontend/src: json/JTM rest_interface

lgiessmann at common-lisp.net lgiessmann at common-lisp.net
Wed Sep 14 12:16:59 UTC 2011


Author: lgiessmann
Date: Wed Sep 14 05:16:58 2011
New Revision: 904

Log:
gdl-interface: fixed a bug when updated fragments after commit/delete operations

Modified:
   branches/gdl-frontend/src/json/JTM/jtm_delete_interface.lisp
   branches/gdl-frontend/src/rest_interface/set-up-gdl-interface.lisp

Modified: branches/gdl-frontend/src/json/JTM/jtm_delete_interface.lisp
==============================================================================
--- branches/gdl-frontend/src/json/JTM/jtm_delete_interface.lisp	Wed Sep 14 05:05:42 2011	(r903)
+++ branches/gdl-frontend/src/json/JTM/jtm_delete_interface.lisp	Wed Sep 14 05:16:58 2011	(r904)
@@ -364,7 +364,6 @@
   "Searches for a topic corresponding to the given identifiers.
    Returns t if there was deleted an item otherweise it returns nil."
   (declare (list jtm-decoded-list) (integer revision))
-
   (let* ((prefs
 	  (jtm::make-prefix-list-from-jtm-list
 	   (jtm::get-item :PREFIXES jtm-decoded-list)))

Modified: branches/gdl-frontend/src/rest_interface/set-up-gdl-interface.lisp
==============================================================================
--- branches/gdl-frontend/src/rest_interface/set-up-gdl-interface.lisp	Wed Sep 14 05:05:42 2011	(r903)
+++ branches/gdl-frontend/src/rest_interface/set-up-gdl-interface.lisp	Wed Sep 14 05:16:58 2011	(r904)
@@ -156,10 +156,12 @@
 				    (elephant:get-instances-by-value 'd:FragmentC 'd:topic top)))
 			       (map nil #'elephant:drop-instance frags))
 			     (create-latest-fragment-of-topic top))
-		       tops))
-	       (unless result
-		 (setf (hunchentoot:return-code*) hunchentoot:+http-not-found+)
-		 (format nil "object not found"))))))
+		       (if (typep result 'd:TopicC)
+			   (delete result tops)
+			   tops)))
+		(unless result
+		  (setf (hunchentoot:return-code*) hunchentoot:+http-not-found+)
+		  (format nil "object not found"))))))
 	(setf (hunchentoot:return-code*) hunchentoot:+http-bad-request+))))
 
 




More information about the Isidorus-cvs mailing list