Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(86)

Side by Side Diff: codereview/models.py

Issue 955: Allow upload with no base (Closed) SVN Base: http://rietveld.googlecode.com/svn/trunk/
Patch Set: Created 4 months, 4 weeks ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2008 Google Inc. 1 # Copyright 2008 Google Inc.
2 # 2 #
3 # Licensed under the Apache License, Version 2.0 (the "License"); 3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License. 4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at 5 # You may obtain a copy of the License at
6 # 6 #
7 # http://www.apache.org/licenses/LICENSE-2.0 7 # http://www.apache.org/licenses/LICENSE-2.0
8 # 8 #
9 # Unless required by applicable law or agreed to in writing, software 9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, 10 # distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 44 matching lines...) Show 10 above Show 10 below
55 55
56 56
57 class Issue(db.Model): 57 class Issue(db.Model):
58 """The major top-level entity. 58 """The major top-level entity.
59 59
60 It has one or more PatchSets as its descendants. 60 It has one or more PatchSets as its descendants.
61 """ 61 """
62 62
63 subject = db.StringProperty(required=True) 63 subject = db.StringProperty(required=True)
64 description = db.TextProperty() 64 description = db.TextProperty()
65 base = db.URLProperty() 65 base = db.StringProperty()
GvR 2008/05/17 03:29:02 Why do you need that? You could just set it to th
66 owner = db.UserProperty(required=True) 66 owner = db.UserProperty(required=True)
67 created = db.DateTimeProperty(auto_now_add=True) 67 created = db.DateTimeProperty(auto_now_add=True)
68 modified = db.DateTimeProperty(auto_now=True) 68 modified = db.DateTimeProperty(auto_now=True)
69 reviewers = db.ListProperty(db.Email) 69 reviewers = db.ListProperty(db.Email)
70 closed = db.BooleanProperty(default=False) 70 closed = db.BooleanProperty(default=False)
71 71
72 _num_comments = None 72 _num_comments = None
73 73
74 @property 74 @property
75 def num_comments(self): 75 def num_comments(self):
(...skipping 350 matching lines...) Show 10 above Show 10 below
426 @classmethod 426 @classmethod
427 def get_email_for_nickname(cls, nickname): 427 def get_email_for_nickname(cls, nickname):
428 """Turn a nickname into an email address. 428 """Turn a nickname into an email address.
429 429
430 If the nickname is not unique or does not exist, this returns None. 430 If the nickname is not unique or does not exist, this returns None.
431 """ 431 """
432 accounts = cls.get_accounts_for_nickname(nickname) 432 accounts = cls.get_accounts_for_nickname(nickname)
433 if len(accounts) != 1: 433 if len(accounts) != 1:
434 return None 434 return None
435 return accounts[0].email 435 return accounts[0].email
OLDNEW

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld r338