Commits

Christopher Grebs  committed 58c486c Merge

Merged in ch/lodgeit-main (pull request #1)

  • Participants
  • Parent commits fc85fa1, 1d04469
  • Branches default

Comments (0)

Files changed (2)

File lodgeit/models.py

         if self.private_id is None:
             while 1:
                 self.private_id = generate_paste_hash()
-                paste = Paste.query.filter(Paste.private_id ==
-                                           self.private_id).first()
+                paste = Paste.query.filter(db.and_(Paste.private_id ==
+                                           self.private_id,
+                                           Paste.paste_id != self.paste_id)) \
+                                   .first()
                 if paste is None:
                     break
     private = property(_get_private, _set_private, doc='''

File lodgeit/static/lodgeit.js

 };
 
 $(document).ready(function() {
-  LodgeIt.init;
+  LodgeIt.init();
 
   /* Autocomplete languages */