]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - lib/common/agendav_plugin.rb
Don't fail if the source user doesn't exist during an AgendavMv.
[mailshears.git] / lib / common / agendav_plugin.rb
index 49e7087d996ce2de850a01ec3c6d0a785b0ecd06..c5e7d7719178dd5035f46b39a2c8cf79c78399ae 100644 (file)
@@ -35,9 +35,11 @@ module AgendavPlugin
 
     connection = PG::Connection.new(@db_hash)
 
 
     connection = PG::Connection.new(@db_hash)
 
-    sql_query  = '(SELECT username FROM prefs)'
-    sql_query += 'UNION'
-    sql_query += '(SELECT user_from FROM shared);'
+    # There are also "owner" and "with" fields in the "shares" table,
+    # but they contains principal URLs and not a bare username. Thus
+    # their format depends on the CalDAV server configuration, and
+    # isn't predictable.
+    sql_query  = 'SELECT username FROM prefs;'
 
     begin
       connection.query(sql_query) do |result|
 
     begin
       connection.query(sql_query) do |result|