"""Add default license text configuration for overlay templates"""
def__init__(self):
super().__init__("034","Add default license text configuration for overlay templates")
defup(self,db_manager)->bool:
"""Add default license text to configuration table"""
try:
withdb_manager.engine.connect()asconn:
# Check if license text configuration already exists
result=conn.execute(text("""
SELECT COUNT(*) FROM configuration WHERE key = 'license_text'
"""))
exists=result.scalar()>0
ifnotexists:
default_license_text='LICENSED BY THE NATIONAL LOTTERIES AND GAMING REGULATORY BOARD - LICENSE NUMBER NLGBR-GB-82-006. Gambling can be addictive and psychologically harmful not allowed for minors'
license_text='LICENSED BY THE NATIONAL LOTTERIES AND GAMING REGULATORY BOARD - LICENSE NUMBER NLGBR-GB-82-006. Gambling can be addictive and psychologically harmful not allowed for minors'
returnjsonify({
"success":True,
"license_text":license_text
})
finally:
session.close()
else:
returnjsonify({"error":"Database manager not available"}),500
placeholder="Enter license text to display on overlays...">LICENSED BY THE NATIONAL LOTTERIES AND GAMING REGULATORY BOARD - LICENSE NUMBER NLGBR-GB-82-006. Gambling can be addictive and psychologically harmful not allowed for minors</textarea>
<divclass="form-text">This text will be displayed as a top bar on all overlay templates. Maximum 500 characters.</div>
constdefaultText='LICENSED BY THE NATIONAL LOTTERIES AND GAMING REGULATORY BOARD - LICENSE NUMBER NLGBR-GB-82-006. Gambling can be addictive and psychologically harmful not allowed for minors';