projects
/
htsworkflow.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec45e54
)
Save new object before attaching to a collection
author
Diane Trout
<diane@ghic.org>
Thu, 2 Jun 2016 20:44:27 +0000
(13:44 -0700)
committer
Diane Trout
<diane@ghic.org>
Fri, 24 Jun 2016 22:55:58 +0000
(15:55 -0700)
Django tests were throwing warning about the newfile object not being
saved when I added it to the datafile_set collection.
experiments/models.py
patch
|
blob
|
history
diff --git
a/experiments/models.py
b/experiments/models.py
index 4a42caae4ba8021d124648c75bd25bedd5893f2b..b7fc5b87beced4598f3bafd2cfa6e0cfb4daa42a 100644
(file)
--- a/
experiments/models.py
+++ b/
experiments/models.py
@@
-351,6
+351,7
@@
class SequencingRun(models.Model):
lane_number=lane_number)
newfile.library = lane.library
+ newfile.save()
self.datafile_set.add(newfile)
self.last_update_time = timezone.now()