← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/remove-sprint-link-unlink-spec into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/remove-sprint-link-unlink-spec into lp:launchpad.

Commit message:
Remove Sprint.linkSpecification and Sprint.unlinkSpecification.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/remove-sprint-link-unlink-spec/+merge/322108
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/remove-sprint-link-unlink-spec into lp:launchpad.
=== modified file 'lib/lp/blueprints/interfaces/sprint.py'
--- lib/lp/blueprints/interfaces/sprint.py	2015-01-06 12:13:28 +0000
+++ lib/lp/blueprints/interfaces/sprint.py	2017-04-06 13:49:11 +0000
@@ -166,13 +166,6 @@
     def removeAttendance(person):
         """Remove the person's attendance record."""
 
-    # bug linking
-    def linkSpecification(spec):
-        """Link this sprint to the given specification."""
-
-    def unlinkSpecification(spec):
-        """Remove this specification from the sprint spec list."""
-
     def isDriver(user):
         """Returns True if and only if the specified user
         is a driver of this sprint.

=== modified file 'lib/lp/blueprints/model/sprint.py'
--- lib/lp/blueprints/model/sprint.py	2015-07-08 16:05:11 +0000
+++ lib/lp/blueprints/model/sprint.py	2017-04-06 13:49:11 +0000
@@ -276,21 +276,6 @@
                 people, need_validity=True))
         return sorted(result, key=lambda a: a.attendee.displayname.lower())
 
-    # linking to specifications
-    def linkSpecification(self, spec):
-        """See `ISprint`."""
-        for speclink in self.spec_links:
-            if speclink.spec.id == spec.id:
-                return speclink
-        return SprintSpecification(sprint=self, specification=spec)
-
-    def unlinkSpecification(self, spec):
-        """See `ISprint`."""
-        for speclink in self.spec_links:
-            if speclink.spec.id == spec.id:
-                SprintSpecification.delete(speclink.id)
-                return speclink
-
     def isDriver(self, user):
         """See `ISprint`."""
         admins = getUtility(ILaunchpadCelebrities).admin


Follow ups