Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

Commit

Permalink
PEP-8 pulp.server.db.model.dispatch and its tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Randy Barlow committed Dec 24, 2014
1 parent ac69e46 commit 31134a0
Show file tree
Hide file tree
Showing 3 changed files with 261 additions and 272 deletions.
7 changes: 4 additions & 3 deletions server/pulp/server/db/model/dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,8 +554,8 @@ class TaskStatus(Document, ReaperMixin):

def save_with_set_on_insert(self, fields_to_set_on_insert):
"""
Save the current state of the TaskStatus to the database, using an upsert operation.
The upsert operation will only set those fields if this becomes an insert operation, otherwise
Save the current state of the TaskStatus to the database, using an upsert operation. The
upsert operation will only set those fields if this becomes an insert operation, otherwise
those fields will be ignored. This also validates the fields according to the schema above.
This is required because the current mongoengine version we are using does not support
Expand All @@ -572,7 +572,8 @@ def save_with_set_on_insert(self, fields_to_set_on_insert):
super(TaskStatus, self).save()
return

# This will be used in place of superclass' save method, so we need to call validate() explicitly.
# This will be used in place of superclass' save method, so we need to call validate()
# explicitly.
self.validate()

stuff_to_update = dict(copy.deepcopy(self._data))
Expand Down
241 changes: 0 additions & 241 deletions server/test/unit/server/async/test_task_status.py

This file was deleted.

Loading

0 comments on commit 31134a0

Please sign in to comment.