projects
/
chemdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b54b173
)
Don't allow duplicate records for the same CAS number.
author
W. Trevor King
<wking@drexel.edu>
Mon, 2 Apr 2012 14:39:57 +0000
(10:39 -0400)
committer
W. Trevor King
<wking@drexel.edu>
Mon, 2 Apr 2012 14:39:57 +0000
(10:39 -0400)
chemdb/models.py
patch
|
blob
|
history
diff --git
a/chemdb/models.py
b/chemdb/models.py
index 5ef57d1cd95abf123e627f4500dc965ba0c50e62..02c1e548805f178ee479a066111bbe1028e7c7b2 100644
(file)
--- a/
chemdb/models.py
+++ b/
chemdb/models.py
@@
-33,7
+33,7
@@
class NFPASpecial (NamedItem):
class CASNumber (NamedItem):
"Chemical Abstracts Service registery number"
cas = _models.CharField(
- 'CAS#', max_length=20)
+ 'CAS#', max_length=20
, unique=True
)
def clean(self):
if not _util.valid_CASno(self.cas):