]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - lib/rm/plugins/davical.rb
Implement user_exists() everywhere and use it to correct the console output.
[mailshears.git] / lib / rm / plugins / davical.rb
index 02e889466849fb7c67aad15e0812afce1e23e33e..04d5fbf024dde17e47375afa486d4359c897c9dd 100644 (file)
@@ -16,6 +16,8 @@ class DavicalRm
     # Delete the given username. DAViCal uses foreign keys properly
     # and only supports postgres, so we let the ON DELETE CASCADE
     # trigger handle most of the work.
+    raise NonexistentAccountError.new(account) if not user_exists(account)
+
     sql_queries = ['DELETE FROM usr WHERE username = $1']
 
     begin