File deletion now works. Still need unit tests.
This commit is contained in:
parent
eb18b6020d
commit
e0c65a6ac4
|
@ -96,7 +96,7 @@ class File( Persistent ):
|
|||
self.__size_bytes or 'null', quote( self.__content_type ), quote( self.object_id ) )
|
||||
|
||||
def sql_delete( self ):
|
||||
return "delete from file where file_id = %s;" % quote( self.object_id )
|
||||
return "delete from file where id = %s;" % quote( self.object_id )
|
||||
|
||||
def to_dict( self ):
|
||||
d = Persistent.to_dict( self )
|
||||
|
|
|
@ -2482,6 +2482,9 @@ File_link_pulldown.prototype.delete_button_clicked = function ( event ) {
|
|||
},
|
||||
function ( result ) { self.wiki.display_storage_usage( result.storage_bytes ); }
|
||||
);
|
||||
|
||||
this.link.href = "/files/new";
|
||||
this.editor.focus();
|
||||
}
|
||||
|
||||
File_link_pulldown.prototype.update_position = function ( anchor, relative_to ) {
|
||||
|
|
Reference in New Issue