From ca16050681b888e61fb2dc484845482176f4e7b7 Mon Sep 17 00:00:00 2001 From: Austin Date: Thu, 30 Apr 2015 16:02:50 -0400 Subject: [PATCH] Update docs with NotUniqueError This was changed in https://github.com/MongoEngine/mongoengine/pull/62. It is present in versions > 0.7 http://docs.mongoengine.org/changelog.html#changes-in-0-7-0. I can reopen against an older branch if preferred. --- docs/guide/defining-documents.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/defining-documents.rst b/docs/guide/defining-documents.rst index 5c45c19a..6f249535 100644 --- a/docs/guide/defining-documents.rst +++ b/docs/guide/defining-documents.rst @@ -401,7 +401,7 @@ MongoEngine allows you to specify that a field should be unique across a collection by providing ``unique=True`` to a :class:`~mongoengine.fields.Field`\ 's constructor. If you try to save a document that has the same value for a unique field as a document that is already in the database, a -:class:`~mongoengine.OperationError` will be raised. You may also specify +:class:`~mongoengine.NotUniqueError` will be raised. You may also specify multi-field uniqueness constraints by using :attr:`unique_with`, which may be either a single field name, or a list or tuple of field names::