[snowy] Add a unique_together for guids, and split the notebook's name correctly
- From: Brad Taylor <btaylor src gnome org>
- To: svn-commits-list gnome org
- Subject: [snowy] Add a unique_together for guids, and split the notebook's name correctly
- Date: Thu, 14 May 2009 10:12:44 -0400 (EDT)
commit 81facc022127b40c2adac04e9054816c8413abde
Author: Brad Taylor <brad getcoded net>
Date: Thu May 14 10:12:20 2009 -0400
Add a unique_together for guids, and split the notebook's name correctly
---
notes/models.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/notes/models.py b/notes/models.py
index 2b7617c..223ad0e 100644
--- a/notes/models.py
+++ b/notes/models.py
@@ -43,7 +43,7 @@ class Note(models.Model):
class Meta:
get_latest_by = 'user_modified'
- unique_together = ('author', 'title')
+ unique_together = (('author', 'title'), ('author', 'guid'), )
def __unicode__(self):
return self.title
@@ -61,5 +61,5 @@ class NoteTag(models.Model):
def get_name_for_display(self):
if self.is_notebook:
- return self.name.split(':', 3)[-1]
+ return self.name.split(':', 2)[-1]
return self.name
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]