fixed wrong indentation style
This commit is contained in:
		| @@ -594,13 +594,13 @@ class Document(BaseDocument): | |||||||
|         for field in obj._data: |         for field in obj._data: | ||||||
|             if not fields or field in fields: |             if not fields or field in fields: | ||||||
|                 try: |                 try: | ||||||
| 		    setattr(self, field, self._reload(field, obj[field])) |                     setattr(self, field, self._reload(field, obj[field])) | ||||||
|                 except (KeyError, AttributeError): |                 except (KeyError, AttributeError): | ||||||
| 		    try: |                     try: | ||||||
| 	                # If field is a special field, e.g. items is stored as _reserved_items, |                         # If field is a special field, e.g. items is stored as _reserved_items, | ||||||
| 		        # an KeyError is thrown. So try to retrieve the field from _data |                         # an KeyError is thrown. So try to retrieve the field from _data | ||||||
| 		        setattr(self, field, self._reload(field, obj._data.get(field))) |                         setattr(self, field, self._reload(field, obj._data.get(field))) | ||||||
| 		    except KeyError: |                     except KeyError: | ||||||
|                         # If field is removed from the database while the object |                         # If field is removed from the database while the object | ||||||
|                         # is in memory, a reload would cause a KeyError |                         # is in memory, a reload would cause a KeyError | ||||||
|                         # i.e. obj.update(unset__field=1) followed by obj.reload() |                         # i.e. obj.update(unset__field=1) followed by obj.reload() | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user