File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ export default defineComponent({
116116 return this .$store .state .currentTableName
117117 },
118118 isMediaColumn() {
119- return this .schema .extra .media_columns .includes (this .fieldName )
119+ return this .schema ? .extra .media_columns .includes (this .fieldName )
120120 }
121121 },
122122 methods: {
Original file line number Diff line number Diff line change 3030from piccolo_api .crud .endpoints import OrderBy , PiccoloCRUD
3131from piccolo_api .crud .hooks import Hook
3232from piccolo_api .crud .validators import Validators
33- from piccolo_api .csp .middleware import CSPMiddleware , CSPConfig
33+ from piccolo_api .csp .middleware import CSPConfig , CSPMiddleware
3434from piccolo_api .csrf .middleware import CSRFMiddleware
3535from piccolo_api .fastapi .endpoints import FastAPIKwargs , FastAPIWrapper
3636from piccolo_api .media .base import MediaStorage
@@ -671,14 +671,13 @@ def __init__(
671671 # We apply a restrictive CSP here to mitigate SVG
672672 # files being used maliciously when viewed by admins
673673 private_app .mount (
674- path = f"/media-files/{ column ._meta .table ._meta .tablename } /{ column ._meta .name } /" ,
675- # noqa: E501
674+ path = f"/media-files/{ column ._meta .table ._meta .tablename } /{ column ._meta .name } /" , # noqa: E501
676675 app = CSPMiddleware (
677676 StaticFiles (
678677 directory = media_storage .media_path
679678 ),
680- config = CSPConfig (default_src = "none" )
681- )
679+ config = CSPConfig (default_src = "none" ),
680+ ),
682681 )
683682
684683 #######################################################################
You can’t perform that action at this time.
0 commit comments