]> gitweb.michael.orlitzky.com - mailshears.git/commitdiff
Don't cast the username to an int in the AgenDAV plugin.
authorMichael Orlitzky <michael@orlitzky.com>
Tue, 19 Mar 2013 16:46:43 +0000 (12:46 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Tue, 19 Mar 2013 16:46:43 +0000 (12:46 -0400)
lib/mailshears/plugins/agendav.rb

index 3dec9260a0a95dee437c6043c44cfb1e92016760..9746f1ce91e7db76cec65dbe46c79e1fdbd69d2e 100644 (file)
@@ -37,8 +37,8 @@ class AgendavDb
     # Delete the given username and any records in other tables
     # belonging to it.
 
-    sql_queries = ['DELETE FROM prefs WHERE username = $1::int;']
-    sql_queries << 'DELETE FROM shared WHERE user_from = $1::int;'
+    sql_queries = ['DELETE FROM prefs WHERE username = $1;']
+    sql_queries << 'DELETE FROM shared WHERE user_from = $1;'
 
     begin
       connection = PGconn.connect(@db_host,